0
它应该如何?更改查询字符串参数
var text = $(this).siblings("[type=text]").val();
document.location = "Default.aspx" + "?id=" + text + "&type=" + query;
它应该如何?更改查询字符串参数
var text = $(this).siblings("[type=text]").val();
document.location = "Default.aspx" + "?id=" + text + "&type=" + query;
属性的名称为window.location
,不document.location
。另外,您可能需要使用encodeURIComponent
来转义这些值中的一个(或两个)。
window.location = "Default.aspx" +
"?id=" + encodeURIComponent(text) +
"&type=" + encodeURIComponent(query);
你想完成什么?请告诉我们结果需要什么以及HTML的样子是什么...... – 2013-04-28 13:19:07