var link ="<a href='javascript:void(0)' onclick='failCardDetail()' >" + data.lt + "</a>"
請問怎麼向failCardDetail方法加入參數?這樣寫什麼不對?
var link = "<a href='javascript:void(0)' onclick='failCardDetail('"+abc+"')' >" + data.lt + "</a>";
屬性不閉合了,用"擴起參數值,注意轉義
var link = "<a href='javascript:void(0)' onclick='failCardDetail(\""+abc+"\")' >" + data.lt + "</a>";