链接传值:<a href="hello.jsp" hello</a>
按钮传值:<input name="name" type="Button"
点击hello链接(或按钮)后直接跳到hello.jsp页面中去,并且把本页面中的变量goodsID传过去,在page.jsp页面中使用变量ID。
链接传值:<a href="page.jsp?ID=<%=goodsID%>"Hello</a>
按钮传值:<input name="name" type="Button"
function addButton()
{
document.formName.action = "aa.jsp ";
document.formName.submit();
}
function modButton()
{
document.formName.action = "bb.jsp ";
return confirm( "Yes/No ");
}
<input type=submit value=add οnclick= "addButton() ">
<input type=submit value=mod οnclick= "return modButton() ">