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