87,919
社区成员
发帖
与我相关
我的任务
分享
fm.action = '/prpall/processPolicyBatchPrint.do?actionType=queryPolicyDocumentType';
fm.target='_parent';
fm.submit();
这个submit之后还能再写一个类似的么,就是说我想让一个方法提交两次,就是action不同。
String path = request.getContextPath();
String basePath = request.getScheme() + "://"
+ request.getServerName() + ":" + request.getServerPort()
+ path + "/";
再在JS中调用:
var basePath = '<%=basePath%>';
alert(basePath); //http://localhost:8080/
二、在跳入当前页面的action中获取根路径,放入request中,再在JS中获取
在action中存入request:
String path = request.getContextPath();
String basePath = request.getScheme() + "://"
+ request.getServerName() + ":" + request.getServerPort()
+ path + "/";
request.setAttribute("basePath", basePath);
再在JS中通过EL表达式调用:
var basePath = ${'basePath'};
alert(basePath); //http://localhost:8080/