方法 1:
<form id = "Form1" name = "Form1" methode = "post" action = "../ news/index.asp"> <table cellpadding = "0" cellspacing = "0"> <tr> <td> <input name = "keyword" type = "text" id = "keyword"/> </td> </tr> <tr> <ttd> <td> <td> <td> <select> <Sewer onchange = "SearchType1 ();"> <option value = "news" selected = "ausgewählt"> 新闻中心 </option> <option value = "case"> 工程案例 </option> </select> <input type = "surenden" name = "value =" 搜索 "/> </td> </tr> </table> </form> </Form> </Form> </Form> </Form> </Form> </Form> </Form> </Form> </Form> </Form> </Form> </Form> </Form> </Form> </script Sprache =" javaScript "> functiontype1 () </Form> </Form> </Form> </Form> </Form> </Form> </scribute =" javaScript "> function (/tabel> </form> </form> </script> </scribut =" javaScript. type = document.getElementById ("SearchType"). Optionen [document.getElementById ("SearchType"). SelectedIndex] .Value; if (type == "news") {document.getElementById ("Form1"). action = "../ news/index.asp"} else if (type == "case") {document.getElementById ("Form1"). Action = "../ case/index.asp"}} </script>方法 2:
<html> <head> <script langer = "javaScript"> Funktion check () {if (document.form1.a [0] .Conted == true) document.form1.Action = "1.htm" ElSeDocument OnSubmit = "check ();"> 转到页面一 <Eingabe type = "radio" name = "a"> 转到页面二 <Eingabe type = "radio" name = "a"> <input name = "" type = "value =" 提交 "> </form> </body> </html>以上这篇用 js 动态改变表单 Form 里的 Aktion 值属性的两种方法就是小编分享给大家的全部内容了 , 希望能给大家一个参考 , 也希望大家多多支持武林网。 也希望大家多多支持武林网。