helloobj3.htm
来自「javascript oop & package sample」· HTM 代码 · 共 24 行
HTM
24 行
<script>
function hanwha(){}
function hanwha.edu(){}
function hanwha.edu.hello() {
this.id = "200200431";
this.name = "冠己荐";
}
hanwha.edu.hello.prototype = {
sayHello : function() {
alert("荤锅 : " + this.id + ", 捞抚 : " + this.name);
},
sayHello2 : function(name) {
alert("荤锅 : " + this.id + ", 捞抚 : " + name);
}
}
var helloObj = new hanwha.edu.hello();
helloObj.sayHello();
helloObj.sayHello2('冠沥辨');
</script>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?