超链接栏点击功能我有动态表。它的第三列显示超链接records..On点击超链接..它应该重定向到新的窗口需要对动态表
这是我的函数:
function getErrorStatusList() {
var serve = JSON.stringify({ program: $("#proselct option:selected").text() });
$.ajax({
type: "POST",
url: "UFZillaErrorStatus.aspx/GetErrorStatusList",
data: serve,
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (response) {
$("#result").empty();
obj = (typeof response.d) == 'string' ? eval('(' + response.d + ')') : response.d;
var output = "<table id='tblResult'><tr><th>Serial No.</th><th>UFZillaID</th><th>MZillaID</th><th>Status</th></tr>";
for (var x = 0; x < obj.length; x++) {
output += "<tr><td>" + (x + 1) + "</td><td>" + obj[x].IssueID + "</td><td>" + obj[x].EMID + "</td><td>" + obj[x].EMStatus + "</td></tr>";
}
output += "</table>";
$("#result").append(output);
},
error: function() { alert("Server Error!!"); }
});
如何创建函数来点击HyperLink数据..我试着给id元素(“EMID”)并创建这样的函数;
$("#EMID").click(function() {
});
但这个亘古不变的命中....
任何建议将是有益的
使用事件代表团http://stackoverflow.com/q/1359018/3639582 –
我已经编辑好标题添加以下代码。请不要包含有关问题标题中使用的语言的信息,除非在没有它的情况下没有意义。标签用于此目的。另请参阅[“应该在其标题中包含”标签“的问题吗?”](http://meta.stackoverflow.com/q/19190/193440),其中的共识是“否,他们不应该 – chridam