js1.jsp:
<input type="button" name="Submit" value="提交" onclick="window.location.href='./js2.jsp';"/>
跳到js2.jsp后有什么方法获取js1.jsp中的table数据
请指教
<input type="button" name="Submit" value="提交" onclick="window.location.href='./js2.jsp';"/>
跳到js2.jsp后有什么方法获取js1.jsp中的table数据
请指教
用<input type="submit" name="Submit" value="提交" />
js2.jsp用request.getParameter(name);来那js1.jsp的数据~`
1:使用iframe,这样的话,js1.jsp js2.jsp都同时存在,可以通过iframe获取document,然后可以读table. 点击button之后,可以把js1.jsp所在的iframe隐藏,这样就模拟了跳转的效果。
2:当table的数据量少的时候,可以直接拼接在onclick="window.location.href='./js2.jsp' 后面。