原文地址:http://oracleabc-126-com.iteye.com/blog/941739
№ <input type="button" value="注册" onClick="window.location.href='register.jsp'">
(在当前页面打开reg.jsp)
№ <input type="button" value="注册" οnclick="javascript:location.href='reg.jsp'">
(在当前页面打开reg.jsp)
№ <input type="button" value="注册" οnclick="window.open('reg.jsp')">
(在新的页面打开reg.jsp)
№ <form name=ok action="xx.jsp" method=post>
<input type="button" value="注册" onClick="goo(a,b)">
<input type=hidden name=xx>
<input type=hidden name=yy>
</form>
<script language="javascript">
function goo(a,b){
xx.value=a;
yy.value=b;
formname.submit();
}
</script>