锘??xml version="1.0" encoding="utf-8" standalone="yes"?>日韩中文字幕一区,91亚洲成人,国产91精品一区二区http://www.aygfsteel.com/dlovek/category/19988.html錛峬y zonezh-cnFri, 13 Apr 2007 15:26:40 GMTFri, 13 Apr 2007 15:26:40 GMT60JS綆鍗旳OP瀹炵幇(杞級http://www.aygfsteel.com/dlovek/archive/2007/04/11/109918.html楹﹀楹﹀Wed, 11 Apr 2007 07:32:00 GMThttp://www.aygfsteel.com/dlovek/archive/2007/04/11/109918.htmlhttp://www.aygfsteel.com/dlovek/comments/109918.htmlhttp://www.aygfsteel.com/dlovek/archive/2007/04/11/109918.html#Feedback0http://www.aygfsteel.com/dlovek/comments/commentRss/109918.htmlhttp://www.aygfsteel.com/dlovek/services/trackbacks/109918.html 1    1<script>  
 2    2.       
 3    3.     function Test(){  
 4    4.         this.say1 =  function(s){  
 5    5.             alert(s);  
 6    6.         }  
 7    7.         this.say2 =  function(s){  
 8    8.             alert(s);  
 9    9.         }  
10   10.     }  
11   11.   
12   12.     function actsAsAspect(object) {  
13   13.       object.yield = null;  
14   14.       object.rv    = { };  
15   15.       object.before  = function(method, f) {  
16   16.         var original = eval("this." + method);  
17   17.         this[method] = function() {  
18   18.           f.apply(this, arguments);  
19   19.           return original.apply(this, arguments);  
20   20.         };  
21   21.       };  
22   22.       object.after   = function(method, f) {  
23   23.         var original = eval("this." + method);  
24   24.         this[method] = function() {  
25   25.           this.rv[method] = original.apply(this, arguments);  
26   26.           return f.apply(this, arguments);  
27   27.         }  
28   28.       };  
29   29.       object.around  = function(method, f) {  
30   30.         var original = eval("this." + method);  
31   31.         this[method] = function() {  
32   32.           this.yield = original;  
33   33.           return f.apply(this, arguments);  
34   34.         }  
35   35.       };  
36   36.     }  
37   37.       
38   38.     function beforeHander(s){  
39   39.         alert("aspect said:");  
40   40.     }  
41   41.     function afterHander(s){  
42   42.         alert("said by aspect");  
43   43.     }  
44   44.   
45   45.     var t = new Test();  
46   46.     actsAsAspect(t);  
47   47.     t.before("say1",beforeHander);  
48   48.     t.after("say2",afterHander);  
49   49.       
50   50.     test = function(){  
51   51.         t.say1("hello1");  
52   52.         t.say2("hello2");  
53   53.     }  
54   54.     test();  
55   55</script>  


楹﹀ 2007-04-11 15:32 鍙戣〃璇勮
]]>
js涓浜涘皬鏂規(guī)硶http://www.aygfsteel.com/dlovek/archive/2007/02/28/101246.html楹﹀楹﹀Wed, 28 Feb 2007 15:58:00 GMThttp://www.aygfsteel.com/dlovek/archive/2007/02/28/101246.htmlhttp://www.aygfsteel.com/dlovek/comments/101246.htmlhttp://www.aygfsteel.com/dlovek/archive/2007/02/28/101246.html#Feedback0http://www.aygfsteel.com/dlovek/comments/commentRss/101246.htmlhttp://www.aygfsteel.com/dlovek/services/trackbacks/101246.html1function聽test(){
3聽聽聽聽alert(arguments.length);//瀹炲弬鐨勬暟鐩?/span>
4聽聽聽聽聽alert(test.length);//琛屽弬鐨勬暟鐩?/span>
5}
2.callee榪斿洖褰撳墠鏂規(guī)硶鐨勫紩鐢?br />
1function聽test(){
3聽聽聽聽alert(arguments.callee.length);//琛屽弬鐨勬暟鐩?/span>
4聽聽聽聽聽//arguments.callee榪斿洖褰撳墠鏂規(guī)硶鐨勫紩鐢紝鎵浠?/span>
5聽聽聽聽聽//arguments.callee聽==聽test
6聽聽聽聽//鎵浠ュ疄闄呬笂浠嶇劧浼猼est.length
7}
3.call(),apply()
call()浼犻掑崟涓弬鏁幫紝apply()鍙傛暟浼犻掍負鏁扮粍鍙傛暟
1var聽Class聽={
2聽聽create:聽function()聽{
3聽聽聽聽returnfunction()聽{
4聽聽聽聽聽聽this.initialize.apply(this,聽arguments);
5聽聽聽聽}

6聽聽}

7}

8

聽1var聽vehicle=Class.create();//vehicle涓轟竴涓柟娉曪紝鎵浠ュ彲浠ユ湁prototype灞炴с傝繑鍥炵殑鏄竴涓瀯閫犲嚱鏁般?/span>
聽3vehicle.prototype={
聽4聽聽聽聽initialize:function(type){//榪欎釜鏂規(guī)硶鍦ㄥ垱寤簐ihicle鐨勫璞$殑鏃跺欒璋冪敤
聽5聽聽聽聽聽聽聽聽this.type=type;
聽6聽聽聽聽}

聽7聽聽聽聽showSelf:function(){
聽8聽聽聽聽聽聽聽聽alert("this聽vehicle聽is聽"+this.type);
聽9聽聽聽聽}

10}

11
12var聽moto=new聽vehicle("Moto");
13moto.showSelf();
14


楹﹀ 2007-02-28 23:58 鍙戣〃璇勮
]]>
html涓嚑涓煎緱娉ㄦ剰鐨勯棶棰?/title><link>http://www.aygfsteel.com/dlovek/archive/2007/02/16/100039.html</link><dc:creator>楹﹀</dc:creator><author>楹﹀</author><pubDate>Fri, 16 Feb 2007 03:30:00 GMT</pubDate><guid>http://www.aygfsteel.com/dlovek/archive/2007/02/16/100039.html</guid><wfw:comment>http://www.aygfsteel.com/dlovek/comments/100039.html</wfw:comment><comments>http://www.aygfsteel.com/dlovek/archive/2007/02/16/100039.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/dlovek/comments/commentRss/100039.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/dlovek/services/trackbacks/100039.html</trackback:ping><description><![CDATA[1.form鍏冪礌鏄粯璁ゆ湁padding鐨勩?br />2.tbody鍦╥e涓嬫病鏈塱nnerHTML灞炴с?br /><img src ="http://www.aygfsteel.com/dlovek/aggbug/100039.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/dlovek/" target="_blank">楹﹀</a> 2007-02-16 11:30 <a href="http://www.aygfsteel.com/dlovek/archive/2007/02/16/100039.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>涓鐐瑰嚱鏁板紡緙栫▼蹇冨緱http://www.aygfsteel.com/dlovek/archive/2007/02/14/99850.html楹﹀楹﹀Wed, 14 Feb 2007 10:00:00 GMThttp://www.aygfsteel.com/dlovek/archive/2007/02/14/99850.htmlhttp://www.aygfsteel.com/dlovek/comments/99850.htmlhttp://www.aygfsteel.com/dlovek/archive/2007/02/14/99850.html#Feedback0http://www.aygfsteel.com/dlovek/comments/commentRss/99850.htmlhttp://www.aygfsteel.com/dlovek/services/trackbacks/99850.html
1function聽a(b)
2{
3聽聽聽聽b();
4}
5a(function(){alert("1");});
鎴戠悊瑙o紝濂藉儚璋冪敤a鏂規(guī)硶鏃跺欙紝鍐呴儴鐨勫嚱鏁扮浉褰撲簬涓涓尶鍚嶇殑鍙橀噺錛岃繖涓彉閲忎繚瀛樹簡褰撳墠鍐呴儴鍑芥暟鐨勫紩鐢ㄣ?br />

楹﹀ 2007-02-14 18:00 鍙戣〃璇勮
]]>
主站蜘蛛池模板: 五指山市| 新绛县| 策勒县| 双流县| 教育| 湾仔区| 荆州市| 建始县| 池州市| 白玉县| 类乌齐县| 博客| 房山区| 抚顺市| 温州市| 盐源县| 上思县| 镇雄县| 邯郸市| 阜新| 砚山县| 平谷区| 丹江口市| 奇台县| 岑巩县| 阿鲁科尔沁旗| 泽普县| 建阳市| 金塔县| 宝兴县| 阿拉尔市| 泰和县| 广宁县| 乌兰察布市| 花垣县| 湖口县| 丹寨县| 沐川县| 桂林市| 罗平县| 琼海市|