方法1:
<表单id =“ form1” name =“ form1”方法=“ onChange =“ searchtype1();”> <option value =“ select” selection =“ selected”>新闻中心</option> <option> <option valit type = document.getElementById(“ searchType”)。选项[document.getElementById(“ searchType”)。selectionIndex] .value; if(type ==“ news”){document.getElementById(“ form1”)。action =“ ../ news/index.asp”} else if(type ==“ case”){document.getElementById(“ form1”)方法2:
<html> <head> <script Lakenanage =“ JavaScript”>函数check(){if(document.form1.a [0] .a [0] .checked == true)document.form1.form1.action =“ 1.htm” elsedocument.form1.action.actor.action =“ 2.htm” 2.htm“} onSubmit =“ check();”>转到页面一<input type =“无线电” name =“ a”>转到页面二<input type =“无线电”名称=“以上这篇用js动态改变表单形式里的动作值属性的两种方法就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持武林网。,也希望大家多多支持武林网。