<input type="text" id="txtSearch" onkeypress="return searchKeyPress(event);" />
<input type="button" id="btnSearch" Value="Search" onclick="doSomething();" />
<script>
function searchKeyPress(e)
{
// look for window.event in case event isn't passed in
e = e || window.event;
if (e.keyCode == 13)
{
document.getElementById('btnSearch').click();
return false;
}
return true;
}
</script>
Revisions
- November 26, 2015 @ 15:28:52 [Current Revision] by admin
- November 26, 2015 @ 15:28:52 by admin
Revision Differences
There are no differences between the November 26, 2015 @ 15:28:52 revision and the current revision. (Maybe only post meta information was changed.)
No comments yet.