锘??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲成人av在线,国产高清亚洲,国产尤物视频在线http://www.aygfsteel.com/ljwiie/category/13760.htmlcatch the opporunityzh-cnWed, 12 May 2010 21:24:22 GMTWed, 12 May 2010 21:24:22 GMT60ECMAScript 緇ф壙鏈哄埗瀹炵幇http://www.aygfsteel.com/ljwiie/archive/2010/05/06/320244.htmlljwiieljwiieThu, 06 May 2010 15:57:00 GMThttp://www.aygfsteel.com/ljwiie/archive/2010/05/06/320244.htmlhttp://www.aygfsteel.com/ljwiie/comments/320244.htmlhttp://www.aygfsteel.com/ljwiie/archive/2010/05/06/320244.html#Feedback0http://www.aygfsteel.com/ljwiie/comments/commentRss/320244.htmlhttp://www.aygfsteel.com/ljwiie/services/trackbacks/320244.html function ClassA(sColor) {
    this.color = sColor;
}

ClassA.prototype.sayColor = function () {
    alert(this.color);
};

function ClassB(sColor, sName) {
    ClassA.call(this, sColor);
    this.name = sName;
}

ClassB.prototype = new ClassA();

ClassB.prototype.sayName = function () {
    alert(this.name);
};
鍦ㄦ渚嬪瓙涓紝緇ф壙鏈哄埗鐢變袱琛岀獊鍑烘樉紺虹殑钃濊壊浠g爜瀹炵幇銆傚湪絎竴琛岀獊鍑烘樉紺虹殑浠g爜涓紝鍦?ClassB 鏋勯犲嚱鏁頒腑錛岀敤瀵硅薄鍐掑厖緇ф壙 ClassA 綾葷殑 sColor 灞炴с傚湪絎簩琛岀獊鍑烘樉紺虹殑浠g爜涓紝鐢ㄥ師鍨嬮摼緇ф壙 ClassA 綾葷殑鏂規硶銆傜敱浜庤繖縐嶆販鍚堟柟寮忎嬌鐢ㄤ簡鍘熷瀷閾撅紝鎵浠?instanceof 榪愮畻絎︿粛鑳芥紜繍琛屻?br />

涓嬮潰鐨勪緥瀛愭祴璇曚簡榪欐浠g爜錛?br /> var objA = new ClassA("blue");
var objB = new ClassB("red", "John");
objA.sayColor(); //杈撳嚭 "blue"
objB.sayColor(); //杈撳嚭 "red"
objB.sayName(); //杈撳嚭 "John"

鎽樿嚜http://www.w3school.com.cn/js/pro_js_inheritance_implementing.asp

ljwiie 2010-05-06 23:57 鍙戣〃璇勮
]]>
瀛愮獥鍙e埛鏂扮埗紿楀彛http://www.aygfsteel.com/ljwiie/archive/2006/12/13/87444.htmlljwiieljwiieWed, 13 Dec 2006 04:28:00 GMThttp://www.aygfsteel.com/ljwiie/archive/2006/12/13/87444.htmlhttp://www.aygfsteel.com/ljwiie/comments/87444.htmlhttp://www.aygfsteel.com/ljwiie/archive/2006/12/13/87444.html#Feedback0http://www.aygfsteel.com/ljwiie/comments/commentRss/87444.htmlhttp://www.aygfsteel.com/ljwiie/services/trackbacks/87444.html聽聽聽聽聽聽parent.window.location.reload();

2.聽 window.open( [sURL] [, sName] [, sFeatures] [, bReplace])
聽聽聽聽聽聽window.opener.location.reload();

3. window.showModalDialog(sURL [, vArguments] [, sFeatures])
聽聽聽聽聽聽
vArguments 鐢?window琛ㄧず錛屼唬琛ㄨwindow瀵硅薄
聽聽聽聽聽聽
window.dialogArguments.location.reload();

ljwiie 2006-12-13 12:28 鍙戣〃璇勮
]]>
JS瀵硅薄http://www.aygfsteel.com/ljwiie/archive/2006/08/04/61683.htmlljwiieljwiieFri, 04 Aug 2006 03:33:00 GMThttp://www.aygfsteel.com/ljwiie/archive/2006/08/04/61683.htmlhttp://www.aygfsteel.com/ljwiie/comments/61683.htmlhttp://www.aygfsteel.com/ljwiie/archive/2006/08/04/61683.html#Feedback0http://www.aygfsteel.com/ljwiie/comments/commentRss/61683.htmlhttp://www.aygfsteel.com/ljwiie/services/trackbacks/61683.html<head>
<meta聽http-equiv="Content-Type"聽content="text/html;聽charset=gb2312"聽/>
<title>JS瀵硅薄</title>
<script聽language="javascript">
聽聽聽聽function聽print(){
聽聽聽聽聽聽聽聽document.write("涔﹀悕涓?"聽+聽this.name聽+聽"<br>");
聽聽聽聽聽聽聽聽document.write("浣滆呬負:"聽+聽this.author聽+聽"<br>");
聽聽聽聽}
聽聽聽聽
聽聽聽聽function聽book(name,author){
聽聽聽聽聽聽聽聽this.name聽=聽name;
聽聽聽聽聽聽聽聽this.author聽=聽author;
聽聽聽聽聽聽聽聽this.print聽=聽print;聽//娌℃湁鎷彿
聽聽聽聽}聽聽聽聽
</script>

</head>

<body>
<script聽language="javascript">
聽聽聽聽var聽c聽=聽new聽book("C璇█","璋旦寮?);
聽聽聽聽c.print();
聽聽聽聽document.write("<br>");
聽聽聽聽
聽聽聽聽for(var聽prop聽in聽c){
聽聽聽聽聽聽聽聽document.write(prop聽+聽":"聽+聽c[prop]聽+聽"<br>");
聽聽聽聽}聽聽聽聽聽聽聽聽
聽聽聽聽document.write("<br>");
聽聽聽聽
聽聽聽聽book.prototype.price聽=聽10;
聽聽聽聽for(var聽prop聽in聽c){
聽聽聽聽聽聽聽聽document.write(prop聽+聽":"聽+聽c[prop]聽+聽"<br>");
聽聽聽聽}聽聽聽聽
</script>

</body>
</html>

ljwiie 2006-08-04 11:33 鍙戣〃璇勮
]]>
主站蜘蛛池模板: 尉氏县| 当阳市| 桃园县| 上杭县| 肃宁县| 九龙县| 福鼎市| 正安县| 巴林左旗| 南华县| 洮南市| 桂阳县| 沈阳市| 永寿县| 红河县| 秦皇岛市| 苍南县| 通河县| 阜新市| 新昌县| 桦南县| 出国| 吐鲁番市| 洛南县| 中牟县| 富阳市| 兴海县| 花垣县| 永年县| 久治县| 峡江县| 广平县| 宜昌市| 大化| 武平县| 盐亭县| 清涧县| 永清县| 睢宁县| 长宁县| 察哈|