日期:2014-05-16  浏览次数:20395 次

js中 超链接的写法,拼接字符串
function formatter(data, index)
{
 return "<a href='/CSMS/stoppageDisplay?manage=1&stoppageId='+data.stoppageId>修改</a>&nbsp;&nbsp;<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>&nbsp;&nbsp;<a href='/CSMS/stoppageDelete?manage=0&stoppageId="+data.stoppageId+"'>删除</a>";
------解决方案--------------------
引用:
return "<a href='/CSMS/stoppageDisplay?manage=1&amp;stoppageId="+data.stoppageId+"'>修改</a>&amp;nbsp;&amp;nbsp;<a href='/CSMS/stoppageDelete?manage=0&amp;stoppageId="+data.stoppageId+"'>删除……
对的
------解决方案--------------------
return "<a href='/CSMS/stoppageDisplay?manage=1&stoppageId="+data.stoppageId+"'>修改</a>&nbsp;&nbsp;<a href='/CSMS/stoppageDelete?manage=0&stoppageId="+data.stoppageId+"'>删除</a>";