应该怎么样?
var text = $(this).siblings("[type=text]").val();
document.location = "Default.aspx" + "?id=" + text + "&type=" + query;
答案 0 :(得分:2)
该媒体资源的名称为window.location
,而非document.location
。此外,您可能希望使用encodeURIComponent
转义这些值中的一个(或两个)。
window.location = "Default.aspx" +
"?id=" + encodeURIComponent(text) +
"&type=" + encodeURIComponent(query);