0

它应该是怎样的?

var text = $(this).siblings("[type=text]").val();
document.location = "Default.aspx" + "?id=" + text + "&type=" + query;
4

1 回答 1

2

该属性的名称是window.location,不是document.location。此外,您可能希望使用 . 转义这些值中的一个(或两个)encodeURIComponent

window.location = "Default.aspx" +
    "?id=" + encodeURIComponent(text) +
    "&type=" + encodeURIComponent(query);
于 2013-04-28T13:20:07.637 回答