How to get enter key to submit my form, using javascript. Please help!?
Please help me. I have a JavaScript code in my form to validate the entry. It works when you press the submit button how can I get it to submit by pressing the enter/return key.
function zipValidate(){
val = document.zipForm.zip.value;
switch(val){
case "nickfrandsen.com":
document.location = 'http://clients.nickfrandsen.com/nickfran...
break;
<form name="zipForm" id="zipForm" method="post" action="">
<div align="center"><span class="style11"><span class="style12">Please type your website address below</span><br>
for example: yourdomain.com</span><br>
<strong><span class="style18">Pressing enter to continue won't work you must click continue</span></strong><br>
<input name="zip" type="text" id="zip" size="45" maxlength="60"/>
<input name="zipButton" type="button" id="zipButton" value="Continue" onClick="zipValidate()" />
</div>
</form>
I know the OnClick command is what submits/validates the form but how do I get it to submit on enter key press or OnClick
Please Help, Thanks in Advance.
0 коммент.:
Post a Comment