隨筆 - 37  文章 - 29  trackbacks - 0


          常用鏈接

          留言簿(3)

          隨筆分類

          隨筆檔案

          最新評論

          閱讀排行榜

          評論排行榜

          YUI(Yahoo! UI Library) 分兩塊:JS和CSS,JS又含分為兩類:工具包(YUI Utilities)和控件庫(YUI Widgets),具體的,看developer.yahoo.com/yui/examples/

          一般使用的話,直接用utilities.js好了

          The utilities.js file rolls up all of the YUI utility components into a single
          file; it includes the following components:

          * Yahoo Global Object
          * Event
          * Dom
          * Connection Manager
          * Animation
          * Drag & Drop
          * Element

          就是包含了工具包里的基本的幾個工具js

          順手記一個js的prototype屬性,YUI里也經常用到。
          var F1 = function(param) {
              this.testNum = param;
          }
          var F2 = function(param) {
              this.testStr = param;
          }
          var a = new F1(25);
          F2.prototype = a;
          var b = F2('hello');
          這個時候b還沒有testNum這個property。
          如果var c = b.testNum; 這時prototype鏈發生作用,使b有了testNum這個property。
          如果設置b.testNum = 30; 那么只改變了b.testNum,而沒有改變a.testNum。
          好像就是繼承關系?

          誰知道F1 || {} 是什么意思?

          再記個JS的dom方法:
          1.刪除節點:node.parentNode.removeChild(node)
          2.增加節點:document.createElement('div');


          posted on 2007-11-25 21:58 EvanLiu 閱讀(497) 評論(0)  編輯  收藏 所屬分類: JS

          只有注冊用戶登錄后才能發表評論。


          網站導航:
          相關文章:
           
          主站蜘蛛池模板: 商洛市| 南华县| 曲靖市| 班戈县| 马尔康县| 文昌市| 台东市| 加查县| 绥德县| 大足县| 渑池县| 射阳县| 吴桥县| 三亚市| 永春县| 丽江市| 鄄城县| 佛学| 英德市| 太谷县| 新乡市| 石渠县| 宁安市| 汝南县| 南和县| 金寨县| 田阳县| 碌曲县| 安国市| 乌拉特后旗| 武宣县| 会宁县| 金坛市| 南阳市| 扬州市| 凉城县| 馆陶县| 易门县| 柘荣县| 余江县| 阳泉市|