復制代碼 代碼如下:
//回車觸發某按鈕的單擊事件
<input type="text" onkeydown="globelQuery(event);"/>
<div>搜索</div>
復制代碼 代碼如下:
//搜索回車實現單擊效果 //兼容 IE 火狐 谷歌
function globelQuery(e) {
if (!e)
e = window.event;
if ((e.keyCode || e.which) == 13) {
$("#globelSearch").click();
}
}
新聞熱點
疑難解答
圖片精選