方法 1 :
<Form ID = "Form1" Name = "Form1" Method = "Post" Action = "../ News/Index.asp"> <Table CellPadding = "0" CellSpacing = "0"> <Tr> <td> <input name = "kata kunci" type = "Text" ID = "Kata Kunci"/</td> </TR> </TR> <"TR> <" pencarian "" pencarian "" TR> <"TR> <" TR> <"pencarian" "pencarian" Onchange = "SearchType1 ();"> <option value = "news" dipilih = "dipilih"> 新闻中心 </pection> <option value = "case"> 工程案例 </pection> </schect> <input type = "kirim" name = "kirim" value = "搜索"/> </td> </tr> </tabel> </Formulir) </Formulir = "JAW = JAW" </TD> </TR> </TABLE> </Formulir) </Formulir = "Fungsi =" JAV "FUNCICE =/TRANPIT 1 type = document.getElementById ("SearchType"). Opsi [Document.GetElementById ("SearchType"). SelectedIndex] .Value; if (type == "news") {document.geteLementById ("form1"). action = "../ news/index.asp"} lain jika (type == "case") {document.geteLementById ("form1"). action = "../ case/index.asp"}} </skrip>方法 2 :
<html> <head> <script language = "javaScript"> function check () {if (document.form1.a [0] .Checked == true) document.form1.action = "1.htm" elsedocument.form1.action = "2.htm"} </script> </head> <wead> <form1 name = "form1" "" "" "" "" "" "" "" "" OnsubMit = "check ();"> 转到页面一 <input type = "Radio" name = "a"> 转到页面二 <input type = "Radio" name = "a"> <input name = "" type = "kirim" value = "提交"> </form> </body> </ html>以上这篇用 JS 动态改变表单 Formulir 里的 Tindakan 值属性的两种方法就是小编分享给大家的全部内容了 , 希望能给大家一个参考 , 也希望大家多多支持武林网。