Bahasa Inggeris [ˈækʃn] AS [ˈækʃən]
n Tindakan, fungsi, kesan;
atribut tindakan javascript sintaks
Fungsi: Tetapkan atau kembalikan atribut tindakan borang.
Sintaks: formObject.action=URL
atribut tindakan javascript contoh
<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 »
Klik butang "Run Instance" untuk melihat instance dalam talian