[英]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.