【发布时间】:2022-01-14 00:14:20
【问题描述】:
不知道为什么这个错误发生在 Chrome 和 Edge 中,但不是在 IE 中(是的,业务团队仍然坚持它)
在这个 html 行上看到“Uncaught SyntaxError: Unexpected end of input”
<TR onmouseover="rowColor(this, true);" onmouseout="rowColor(this, false);" onclick='workTicket('displayTicket.action?TICKETID=1367698&TTID=14','1367698');'>
下面是对应的jsp/struts行
<TR onmouseover="rowColor(this, true);" onmouseout="rowColor(this, false);" onclick='workTicket(<c:out value="'displayTicket.action?TICKETID=${dispTO.ticketNbr}&TTID=${dispTO.ticketTypeId}','${dispTO.ticketNbr}'" />);'>
除了 onclick 属性以单引号开头之外,我在上面的行中没有看到任何错误。知道为什么会这样吗?
【问题讨论】: