我试图从一个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
但currectly我正在歌厅输出为:
http://localhost:8080/visionbooks/myimage/secure/ImageAction?imageId="+para+"
变量名传递作为prameter value.Why?
请帮我解决这个问题。