JavaScript Reference/Javascript Methods/submit
Версия от 18:30, 25 мая 2010; (обсуждение)
"submit()" Example
<html>
<body>
<script language="JavaScript">
function function1(){
document.all.myForm.submit();
}
</script>
<form id="myForm" class="explanations" method="post" action="yourfile.asp">
Enter your first name:
<input type="text">
</form>
<input type="button" value="Send the form" onClick="function1();">
</body>
</html>
"submit()" is applied to
+----------------+--------------------------------------------------------------+
| Applied_To |<form> |
+----------------+--------------------------------------------------------------+
"submit()" Syntax, Parameters and Note
Note:
Sends a form"s data to the server.
Syntax:
document.getElementById("formID").submit()
document.all.formID.submit() // IE only