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()' >" + 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>";