跳转到jsp(不要在后面带参数,传递无效)
<input type="button" οnclick="window.location.href='product_add.jsp?type=<%=type %>>'" value="添加">
跳转到servlet
<input type="button" οnclick="window.location.href='<%=path%>/servlet/ProductAdd?type=<%=type %>>'" value="添加">
跳转到jsp(不要在后面带参数,传递无效)
<input type="button" οnclick="window.location.href='product_add.jsp?type=<%=type %>>'" value="添加">
跳转到servlet
<input type="button" οnclick="window.location.href='<%=path%>/servlet/ProductAdd?type=<%=type %>>'" value="添加">
转载于:https://www.cnblogs.com/xingyyy/p/3485812.html