我正在尝试从 jquery 函数传递参数。一切都很好,但唯一的问题是传递参数值rowObject.themeScreenshot
<script type="text/javascript">
function formatLink(cellvalue, options, rowObject)
{
var para=rowObject.themeScreenshot; //here value is coming fine
alert("Json object value-"+para); //correctly i am geting the value of para.
return "<a style='cursor:pointer;' onClick='javascript:openDialog("+cellvalue+")'><img src='<s:url action='ImageAction' namespace='/myimage/secure'><s:param name='imageId'>"+para+"</s:param></s:url>'></a>";
//this is returning url with empty imagId output in url:-http://localhost:8080/visionbooks/myimage/secure/ImageAction?imageId=
}
我想要的是:-
http://localhost:8080/visionbooks/myimage/secure/ImageAction?imageId=anyvalue
但目前我得到的输出是:
http://localhost:8080/visionbooks/myimage/secure/ImageAction?imageId="+para+"
变量名作为参数值传递。为什么?
请帮我解决这个问题。