kennygadams
Programmer
Hi,
How do you disabling submit/enter keyboard button for a specific text input form box.
Kenny
How do you disabling submit/enter keyboard button for a specific text input form box.
Kenny
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
<input type="submit" value="Press Me" onkeypress="checkPress(event)" />
AND
<form method="post" onsubmit="return checkEnter(event)">
<script type="text/javascript">
var enterWasPressed = false;
function checkPress(e) {
if (e.keyCode == 13) {
enterWasPressed = true;
alert("hee");
}
}
function checkEnter(e) {
if (enterWasPressed) {
return false;
}
}
</script>
<form name='search'>
<input type='text' size='30' name='search_term' value="" >
<input type='button' value='Clipart Search' onClick='search_call()'>
</form>