隨筆 - 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 閱讀(258) 評論(0)  編輯  收藏

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


          網站導航:
           
          主站蜘蛛池模板: 南漳县| 红原县| 石棉县| 绵竹市| 蒙城县| 漠河县| 淅川县| 大城县| 汤阴县| 清丰县| 灵山县| 鹤山市| 阳东县| 垦利县| 杨浦区| 明水县| 门源| 灵武市| 宝兴县| 永修县| 定安县| 双牌县| 温州市| 即墨市| 吐鲁番市| 大英县| 兴安盟| 济源市| 肥东县| 晴隆县| 阳高县| 万年县| 吴旗县| 丰台区| 梧州市| 德昌县| 会泽县| 清远市| 卫辉市| 通山县| 南昌县|