隨筆 - 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)  編輯  收藏

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


          網站導航:
           
          主站蜘蛛池模板: 江华| 普安县| 石家庄市| 玉溪市| 任丘市| 巴青县| 嘉祥县| 营山县| 彭州市| 遂宁市| 科技| 杭州市| 玉屏| 清水河县| 垦利县| 宜丰县| 阿鲁科尔沁旗| 呼图壁县| 南涧| 扶风县| 青神县| 固始县| 五寨县| 白水县| 合肥市| 台湾省| 西吉县| 开封市| 金湖县| 宜州市| 新平| 张家港市| 定兴县| 许昌县| 新乐市| 阳泉市| 翁牛特旗| 上虞市| 文成县| 镇江市| 霞浦县|