Thursday, May 22, 2008

用JAVASCRITP实现SINGLE FORM SINGLE BUTTON MULTIACTION

"< language="javascript">

function navigator(theForm)
{
if(theForm.action[0].checked)
{
theForm.action ="action1.asp";
theForm.target="_self"; //use the same window
return true;
}
else if(theForm.action[1].checked)
{
theForm.action ="action2.asp";
theForm.target="_self";
return true;
}

//-->
< /script>
< method="post" name="myForm">

< INPUT type=radio value=Y name=action> Yes
< INPUT type=radio value=N name=action>No


< name=submit type=submit onClick="return navigator(myForm)" value=Submit >

< /form>