<script>
function my(theform)
{
if(theform.check1.checked)
theform.action="ur.asp?id=xxx"; //check1为checkbox的name
else
theform.action="sd.asp?id=xxx";
return true;
}
</script>
<form action="" method="post" onsubmit="return my(this)">
……
function my(theform)
{
if(theform.check1.checked)
theform.action="ur.asp?id=xxx"; //check1为checkbox的name
else
theform.action="sd.asp?id=xxx";
return true;
}
</script>
<form action="" method="post" onsubmit="return my(this)">
……
<input type=checkbox name=mm><input type=submit></form>
<input type=checkbox name=mm><input type=submit></form>
a=request.form("a")
b=request.form("b")
接受到的參數,可以這樣寫嘛?
if(theform.check1.checked)
theform.action="ur.asp?a=a"; //check1为checkbox的name
else
theform.action="sd.asp?a=a";
return true;