JavaScript Reference/Javascript Properties/action — различия между версиями
Admin (обсуждение | вклад) м (1 версия) |
|
(нет различий)
|
Текущая версия на 08:22, 26 мая 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