我在enter key
的keyUp事件上调用了这个方法 function PerformSearch(search_key) {
var url = "<%=ResolveUrl("/Test/TestPage.aspx?type=search&search_key=")%>" + search_key;
//GoToLocation(url);
//window.open(url);
//$(location).attr("href", url);
//window.location.replace(url);
window.location.href = url;
}
答案 0 :(得分:1)
答案 1 :(得分:0)
您的网址中存在字符串连接错误。
此:
var url = "<%=ResolveUrl("/Test/TestPage.aspx?type=search&search_key=")%>" + search_key;
应该是这样的:
var url = "<%=ResolveUrl('/Test/TestPage.aspx?type=search&search_key=')%>" + search_key;