示例,
<span class="hotspot"
onmouseover="tooltip.show('<table id=\"test\"><tr><th>123</th></tr><tr><th>123</th></tr></table>');"
onmouseout="tooltip.hide();">porttitor orci</span>
在这里,我试图在表标签中添加 id 属性,但我已经使用了“”和“”,所以有些东西搞砸了并且不起作用。
有什么好的解决办法吗?
最佳答案
<span class="hotspot"
onmouseover="tooltip.show('<table id="test"><tr><th>123</th></tr><tr><th>123</th></tr></table>');"
onmouseout="tooltip.hide();">porttitor orci</span>
关于javascript - 在 HTML 属性中添加引号,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20537667/