yunye 的 JavaBlog

          @see codemouse

          統(tǒng)計

          留言簿(1)

          閱讀排行榜

          評論排行榜

          使用 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) 評論(0)  編輯  收藏 所屬分類: javascript

          主站蜘蛛池模板: 鄢陵县| 庐江县| 涟源市| 乌拉特前旗| 松江区| 油尖旺区| 德保县| 图木舒克市| 红河县| 台湾省| 巨鹿县| 阿拉尔市| 阿鲁科尔沁旗| 眉山市| 崇左市| 英德市| 雅江县| 郁南县| 于都县| 丽水市| 庆城县| 新竹县| 和田市| 宽城| 通道| 诏安县| 曲沃县| 电白县| 诸城市| 南宫市| 白银市| 建始县| 贵南县| 安丘市| 那曲县| 上高县| 峨眉山市| 阿鲁科尔沁旗| 汝阳县| 时尚| 察哈|