<分区>
我试图在超链接 onClick 中调用一个 javascript 方法,在 JSTL 中设置一个参数,如下所示:
<c:if test="${not test1 && test2}">
<div class="alert alert-danger" role="alert">Message....
<a onclick="executeBusinessPatch(<c:out value="${paymentId}"/>)" style="color: #a94442"><b>Configure Now.</b>
</a>
</div>
</c:if>
function executeBusinessPatch(inAppPaymentTenderId) {
alert(inAppPaymentTenderId);
}
但是当单击超链接时,我会遇到上述错误 Uncaught SyntaxError: Invalid or unexpected token
。可能出了什么问题?