yunye 的 JavaBlog

          @see codemouse

          統(tǒng)計(jì)

          留言簿(1)

          閱讀排行榜

          評(píng)論排行榜

          使用 Enter 鍵提交表單

          <SCRIPT type=text/javascript>
              function doClick(buttonName,e)
              {
          //the purpose of this function is to allow the enter key to //point to the correct button to click.
                  var key;
          
                   if(window.event)
                        key = window.event.keyCode;     //IEelse
                        key = e.which;     //firefoxif (key == 13)
                  {
                      //Get the button the user wants to have clicked
                      var btn = document.getElementById(buttonName);
                      if (btn != null)
                      { //If we find the button click it
                          btn.click();
                          event.keyCode = 0
                      }
                  }
             }
          </SCRIPT>

          posted on 2008-08-30 03:21 yunye 閱讀(241) 評(píng)論(0)  編輯  收藏 所屬分類(lèi): javascript

          主站蜘蛛池模板: 通山县| 洛隆县| 嘉兴市| 镇雄县| 江油市| 中江县| 青河县| 高密市| 福贡县| 托克托县| 南岸区| 碌曲县| 皋兰县| 宁晋县| 秦皇岛市| 成武县| 长沙县| 晋城| 龙井市| 寻乌县| 奉化市| 明星| 宜良县| 泰和县| 和林格尔县| 临沭县| 九台市| 香港 | 东方市| 嘉荫县| 衢州市| 万荣县| 阿合奇县| 孟州市| 星子县| 凭祥市| 东乌珠穆沁旗| 平潭县| 曲靖市| 峨边| 泰和县|