我正在使用链接按钮将页面重定向到我想要的位置,并使用来自 Jquery 的一些查询字符串值。链接按钮代码如下:
<td>
<a id="selectAllLink" class="button" rel="nofollow ibox&width=800&height=400&title=Contact Now"
href="#" onclick="return (this.href=='#');">Contact Selected</a>
</td>
并且将在我的链接按钮的单击事件上创建/更新链接的 Jquery 如下:
function CotactSelected() {
var a = [];
var n = $("td.title_listing input:checked");
var s = "";
n.each(function() {
a.push($(this).val());
});
var s = a.join(',');
if (s != null) {
$("@.button#selectAllLink").attr("href", "/D_ContactSeller.aspx?property=" + s);
}
else {
alert("Select atleast one property to contact!");
}
}
我想做的是它会从复选框中收集所有逗号分隔的值,并将其传递到另一个页面,并将收集的值作为查询字符串。单击该链接按钮时,它应该带有所有逗号分隔的值并重定向到所需的页面。请帮助我..在此先感谢。