隨筆 - 8  文章 - 24  trackbacks - 0
          <2008年10月>
          2829301234
          567891011
          12131415161718
          19202122232425
          2627282930311
          2345678

          常用鏈接

          留言簿(4)

          隨筆檔案

          搜索

          •  

          最新評論

          閱讀排行榜

          評論排行榜

          <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
          <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
          <head>
              
          <title>Todoist</title>
              
          <script>
                  
          function Douban(){
                      Douban.val 
          = "test";
                      Douban.prototype.test 
          = function(name){
                          alert(
          "hello "+name);
                      }
                      Douban.testA 
          = function(name){
                          alert(
          "hello "+name);
                      }
                  };
              
          </script>
          </head>
          <body>

          <script>
              
          var douban = new Douban();
              alert(Douban.val);
              douban.test(
          "中國");
              Douban.testA(
          "中國");
          </script>

          </body>
          </html>

          直接設的可以直接調用,使用prototype的,需要有一該類的對象。
          posted on 2008-10-30 17:37 Vincent.Yu 閱讀(252) 評論(0)  編輯  收藏

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


          網站導航:
           
          主站蜘蛛池模板: 衡东县| 平乡县| 九寨沟县| 黎城县| 凌云县| 古田县| 宁阳县| 阳朔县| 乡城县| 团风县| 中方县| 揭阳市| 滨州市| 兰溪市| 铁岭县| 甘谷县| 精河县| 湾仔区| 姚安县| 怀化市| 静宁县| 广元市| 明光市| 沙洋县| 嘉峪关市| 黄山市| 紫金县| 贵德县| 灵丘县| 北票市| 通化县| 栖霞市| 阳信县| 武汉市| 公主岭市| 赣州市| 永平县| 筠连县| 微山县| 黑龙江省| 白山市|