87,907
社区成员
发帖
与我相关
我的任务
分享
webiURL = "openDocument.jsp?" +
"iDocID=" + iDocID +"&token=" + token+"&user="+user+"&path="+docPath;
response.sendRedirect(webiURL);
var user =getUser(window.parent.location.search);
alert(encodeURI(window.parent.location.search));
public String uri(key, value) {
return java.net.URLEncoder.encode(key,"UTF-8")+"="+java.net.URLEncoder.encode(value, "UTF-8") + "&";
}
webiURL = "openDocument.jsp?" + uri("iDocID", iDocID) + uri("token", token) +
uri("user", user) + uri("path", path);
response.sendRedirect(webiURL);
// js 读取
function getRequest(key) {
var regex = new RegExp("[?&]" + encodeURIComponent(key) + "\\=([^&#]+)");
var value = (location.search.match(regex)||["",""])[1];
return decodeURIComponent(value);
}
var path = getRequest("path");
alert(path);
var user =getUser(window.parent.location.search);
var s=unescape(encodeURI(window.parent.location.search).replace(/\\\\u/g,'%u'));
alert(s)