cript type="text/javascript">function search(id){var selKey=encodeURI(document.getElementById(id).value);//var selKey=document.getElementById(id).value;if (selKey=='%u5546%u54C1%u641C%u7D22'){keyword.value = '';keyword.focus();return false;}else{window.location='Search-' + selKey + '-0-0-0-0-1.html'; //selKey为要参数}}输入参数:皮衣后后台通过:Server.UrlPathEncode(Request["selKey"]) (获取参数)我该怎么办?
2 回答
函数式编程
TA贡献1807条经验 获得超9个赞
前端escape()
服务端HttpUtility.UrlDecode()
也就是说
cript type="text/javascript">
function search(id){
var selKey=escape(document.getElementById(id).value);
//var selKey=document.getElementById(id).value;
if (selKey=='%u5546%u54C1%u641C%u7D22')
{
keyword.value = '';
keyword.focus();
return false;
}
else
{
window.location='Search-' + selKey + '-0-0-0-0-1.html'; //selKey为要参数
}
}
HttpUtility.UrlDecode(Request["selKey"])
添加回答
举报
0/150
提交
取消