JavaScript Tutorial/Form/onSubmit
Версия от 18:52, 25 мая 2010; (обсуждение)
Form onSubmit event handler
<html>
<head>
<title>A Simple Page</title>
<script language="JavaScript">
<!--
function sendMe()
{
return confirm("Do you want to continue the submission?");
}
// -->
</script>
</head>
<body>
<form name="form1" method="POST" action="" onSubmit="return sendMe()">
<P><input type="text" name="inp1">
<input type="submit" value="Submit" >
<input type="reset" value="Reset"></p>
</form>
</body>
</html>