js中 超链接的写法,拼接字符串
function formatter(data, index)
{
return "<a href='/CSMS/stoppageDisplay?manage=1&stoppageId='+data.stoppageId>修改</a> <a href='/CSMS/stoppageDelete?manage=0&stoppageId='+data.stoppageId>删除</a>";
}
其中data.stoppageId是链接中要获得的参数,这应该怎么写啊?字符串拼不起来,总是把data.stoppageId当字符串处理,不显示data.stoppageId对应的参数
function
javascript
字符串
拼接
链接
------解决方案--------------------return "<a href='/CSMS/stoppageDisplay?manage=1&stoppageId="+data.stoppageId+"'>修改</a> <a href='/CSMS/stoppageDelete?manage=0&stoppageId="+data.stoppageId+"'>删除</a>";
------解决方案--------------------对的
------解决方案--------------------return "<a href='/CSMS/stoppageDisplay?manage=1&stoppageId="+data.stoppageId+"'>修改</a> <a href='/CSMS/stoppageDelete?manage=0&stoppageId="+data.stoppageId+"'>删除</a>";