代码拉取完成,页面将自动刷新
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script>
var obj1 = {
nane : 'xioamming',
age : '10',
run : function(){
console.log('pao');
}
}
console.log(obj1.age);
console.log(obj1.nane);
console.log(obj1);
obj1.run();
var obj = new Object();
obj.nane = 'xioamming',
obj.nage = '10',
obj.run = function(){
console.log('pao');
}
console.log(obj);
function Student(name ,age ){
this.name = name ;
this.age = age;
this.run = function(){
console.log(this.name + "pao");
};
}
var obj3 = new Student('niubei' , '18');
console.log(obj3);
obj3.run();
function Person(){
}
Person.prototype.name = " niubei";
Person.prototype.sex = "nan";
Person.prototype.run = function(){
console.log(this.name + "pao");
};
var obj4 = new Person();
console.log(obj4);
obj4.tun;
function Person(name){
this.name = name;
}
Person.prototype.run = function(){
console.log(this.name + "pao");
};
var obj5 = new Person("niubie");
console.log(obj5);
obj5.run();
function Person(name){
this.name = name;
}
var obj = new Person("niubie");
console.log()
function Father (uname , age){
this.uname = uname;
this.age = age;
}
function Son(uname, age,score){
Father.call(this, uname, age);
this.score = score;
}
var son = new Son('zhangsan' , 18,100);
console.log(son);
function Person(name ,sex){
console,log("woshi" + this.name + "(" + this.sex + ")");
}
var p1 = {
name :"niubie",
sex : "nan",
}
var p2 = {
name :"dioachan",
sex : "nv",
}
Person.call(p1);
Person.call(p2);
</script>
</head>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。