📄 test6.js
字号:
function test() {
}
test.prototype = {
p1 : "p1",
p2 : "p2",
f1 : function() {
alert("f1");
},
f2 : function() {
alert(this.p2);
}
}
function test2() {
}
for (p in test.prototype) {
test2.prototype[p] = test.prototype[p];
}
test2.prototype.newMethod = function() {
alert("newMethod");
}
var t = new test2();
t.f2();
t.newMethod();
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -