1 Star 0 Fork 0

zz/ web

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
jq20230313.html 2.70 KB
一键复制 编辑 原始数据 按行查看 历史
zz 提交于 2023-03-13 20:37 . 12
<!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>
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/z439442/web.git
git@gitee.com:z439442/web.git
z439442
web
web
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385