Ticker

6/recent/ticker-posts

Onsubmit event and form data store in address bar of browser

 <html>

<head>

<script>

function a()

{

if(isNaN(document.mform.t1.value))

{

alert ("not correct");

return false;

}

else

{

alert("correct");

return true;

}

}

</script>

</head>

<body>

<form action="a1.html" method="get" onsubmit="return a()" name="mform">

enter phone number<input type="text" id="t1">

<input type ="submit" value ="send">

</form>

</body>

</html>

Post a Comment

0 Comments