UK[??k?n] US[??k??n]

n.Action, activity; function, role; means; [Law] litigation

Third person singular: actions Plural: actions Present participle: actioning past tense: actioned

javascript action attribute syntax

Function: Set or return the action attribute of the form.

Syntax: formObject.action=URL

javascript action attribute example

<html>
<head>
<script type="text/javascript">
function changeAction()
{
var x=document.getElementById("myForm")
alert("表單action: " + x.action)
x.action="/course"
alert("表單新action: " + x.action)
x.submit()
}
</script>
</head>
<body>

<form id="myForm" action="/index.php">
名稱:<input type="text" value="米老鼠" />
<input type="button" onclick="changeAction()"
value="改變 action 屬性并提交表單" />
</form>

</body>
</html>

Run instance ?

Click the "Run instance" button to view the online instance