JavaScript Reference/Javascript Properties/action
Версия от 18:30, 25 мая 2010; (обсуждение)
"action" Example
<html>
<head>
<script>
function sending() {
document.all.myForm.action = "yourpage.asp";
document.all.myForm.submit();
}
</script>
</head>
<body>
<form id="myForm">
Full Name:
<input type="text" name="fullname" value="">
<button onclick="sending();">Submit</button>
</form>
</body>
</html>
"action" is applied to
+----------------+--------------------------------------------------------------+
| Applied_To |<form> <isindex> |
+----------------+--------------------------------------------------------------+
"action" Syntax and Note
Note:
Read and write property.
Specifies the form action URL.
Syntax:
document.getElementById("elementID").action = value
document.all.elementID.action = value // IE only