1、首先输入下方的命令代码:
,就完成了。
可以这样:
window.location.href="a.asp?name=<%server.URLEncode("+username+")%>"
改为这样试试~这样会对你的参数进行编码,显示的样式如:a.asp?name=%C9%CC%B3%AC%D5%FB%CC%E5%B2%DF%BB%AE
function winPostHref(url,params){
var temp=document.createElement("form");
temp.action=URL;
temp.method="POST";
temp.style.display="none";
if(params != null){
for(var x in params) {
var opt=document.createElement("input");
opt.name=x;
opt.type='hidden';
opt.value=params[x];
temp.appendChild(opt);
}
}
temp.submit();
return temp;
}
用post方式提交