我正在尝试创建一个动态 html td
,如下所示:
var id = "testId";
var issueId = "testIssueId";
var sourceRow = ($(this).find("OBJECTID").text() === "") ? '<td></td>' : "<td><img src='contactImages/attachmentImage.png' onclick='issueAttachmentAttachmentLookUp('"+id+"','"+issueId+"')'> </img></td>" ;
当我点击上面 td
(在 Firefox 中)时,我收到以下错误:
语法错误:预期的表达式,得到 '}'
功能是:
function issueAttachmentAttachmentLookUp(strIssueID, issueID1)
{
var aryArgument = new Array();
aryArgument[0] = m_stateData;
aryArgument[1] = g_ContactSoapWebServiceURL;
aryArgument[2] = g_PQContactTree;
aryArgument[3] = strIssueID;
aryArgument[4] = m_PQClientConfig;
aryArgument[5] = g_BAList;
aryArgument[6] = g_references;
aryArgument[7] = ResponseNode;
aryArgument[8] = issueCurrentBA;
aryArgument[9] = issueID1;
ModalHelper.showModalDialog(
'PQCaseAttachment.htm',
'Issue Attachments',
890,
700,
aryArgument,
function(refreshWindow)
{
if(refreshWindow){
refresh();
}
}
);
}
我怀疑 onclick 事件语法有问题,但无法识别问题。
有人有任何线索吗?