未终止字符串文字错误消息

Unterminated String Literal Error Message

本文关键字:错误 消息 文字 字符串 终止      更新时间:2023-09-26

我知道这个问题已经问了几百次了,但是在这个特殊的例子中,经过一个小时的搜索,我无法发现错误" unterated string literal"背后的原因。这是我的代码。

 newRow.innerHTML = '<td>1</td><td><input type="text" name="quantity' + (num) + '" size="5" /></td><td><input type="text" name="description' + (num) + '" size="50"/></td><td>$<input type="text" name="price' + (num) + '" size="5" /></td><td><input type="text" name="catalognum' + (num) + '" onChange="addRow()"/></td><a class="removelink" onclick=''removeElement(' + rowIdName + ')''>Remove This File<

尝试添加:

/a>';

在代码末尾