⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 test8.js

📁 《征服Ajax》原书的例题源码
💻 JS
字号:
Object.extend = function(destination, source) {  for (property in source) {    destination[property] = source[property];  }  return destination;}


function test() {
}

test.prototype = {
	p1 : "p1",
	p2 : "p2",
	f1 : function() {
		alert("f1");
	},
	f2 : function() {
		alert(this.p2);
	}
}

function test2() {
}

test2.prototype = Object.extend (test.prototype, {
	newMethod : function () {
		alert("newMethod");
	}
});

var t = new test();
t.newMethod(); // 输出"newMethod"

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -