<script language="javascript">
function check(v)
{
alert(document.frm);
if(v=="s1")
{
document.frm.target = "_blank";
document.frm.action = "a.htm";
}
else
{
document.frm.target = "_self";
document.frm.action = "b.htm";
}
return true;
}
</script>
<form name="frm">
<input type="submit" name="s1" value="s1" onClick="return check(this.value);" />
<input type="submit" name="s2" value="s2" onClick="return check(this.value);"/>
</form>
function check(v)
{
alert(document.frm);
if(v=="s1")
{
document.frm.target = "_blank";
document.frm.action = "a.htm";
}
else
{
document.frm.target = "_self";
document.frm.action = "b.htm";
}
return true;
}
</script>
<form name="frm">
<input type="submit" name="s1" value="s1" onClick="return check(this.value);" />
<input type="submit" name="s2" value="s2" onClick="return check(this.value);"/>
</form>
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货