The code copy is as follows:
//Enter triggers a button click event
<input name="" type="text" id="searchkey" onkeydown="globelQuery(event);"/>
<div onclick="searchByKey()" id="globelSearch">Search</div>
http://img.blog.csdn.net/20140227095828937?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvYmFpY3Az/font/5a6L5L2T/fontsize/400/fill/ I0JBQkFCMA==/dissolve/70/gravity/SouthEast
The code copy is as follows:
//Search Enter to achieve click effect//Compatible with IE Firefox Valley Song
function globelQuery(e) {
if (!e)
e = window.event;
if ((e.keyCode || e.which) == 13) {
$("#globelSearch").click();
}
}