[英]add href link to <a> Tag in css
我有动态表.in数据从DB asHyperlink Records填充
这是脚本:
function getErrorStatusList() {
});
$.ajax({
// parameters
success: function (response) {
//Data gets in response
var output = "<table class='table'><tr><th>MZillaID</th></tr>";
for (var x = 0; x < obj.length; x++) {
output += "<tr><td class='myclass' style='text-decoration:underline;'>" + obj[x].EMID + "</td></tr>";
}
output += "</table>";
$("#result").append(output);
},
});
这工作正常。这个记录生成为输出HTML中的超链接
如
<a href="http://mzillaint.nokia.com/show_bug.cgi?id=87774">87774</a>
..我想把它放在Css上。我的意思是在css中添加“a”标签并将href放入其中
喜欢
a
{
href://link which generated
}
我试过但这不是实施..我怎么能这样做?任何建议都会有所帮助
绝对不可能。 您无法使用CSS修改DOM,因为CSS仅显示。
在添加DOM之后,您应该使用javascript或jquery来执行此操作。
$("#result").append(output);
$("#result a").attr('href',generated_link_here);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.