隨筆 - 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 閱讀(505) 評論(0)  編輯  收藏 所屬分類: JS

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


          網站導航:
          相關文章:
           
          主站蜘蛛池模板: 五原县| 江城| 靖边县| 繁峙县| 拜城县| 通山县| 崇信县| 淄博市| 南溪县| 加查县| 昌都县| 新竹市| 任丘市| 横山县| 娄底市| 六枝特区| 久治县| 赫章县| 鲁甸县| 金阳县| 舞阳县| 肃宁县| 罗田县| 航空| 桑植县| 乌兰察布市| 甘谷县| 民权县| 曲靖市| 沙雅县| 临安市| 澎湖县| 衡山县| 石阡县| 日喀则市| 维西| 古浪县| 轮台县| 怀来县| 山阴县| 大余县|