Code:
<script language="javascript">
function xyz(){
var input = document.forms[0].name.value;
alert("Hi !"+input);
}
</script>
<body onLoad="alert('The page is loaded');" >
<form onSubmit="xyz()">
<label>Your Name</label>
<input type="text" name="name" />
<br>
<input type="submit" value="Submit" />
</form>
</body>
Comments
Post a Comment