【发布时间】:2012-06-21 03:53:45
【问题描述】:
我一直在开发页面构建器,但遇到了这个双引号问题。
div id="set" style="color:black;font-size:12px"
document.getElementById('set').style.backgroundImage="url('editor.png')"
或
document.getElementById('set').style.backgroundImage="url(editor.png)"
这在firefox和IE中设置
div id="set" style="url("editor.png");color:black;font-size:12px"
当页面被保存并重新加载时,双引号会破坏样式。
有人知道解决这个问题的方法吗?
【问题讨论】:
标签: background background-image quotes