在下面的示例标记中,使用html5 contentEditable="true"
时,<span id="cookie">
是否有某种方法可以编辑?
<div contentEditable="true">
This text be edited. <span id="nodelete">Except for this text.</span> This can be edited as well.
</div>
答案 0 :(得分:1)
好的,根据无位请求:
我将使用的解决方案是将内部span
声明为内联div
,但将contentEditable
设置为false,就像这样......
<div contentEditable="true">
This text be edited. <div style="display: inline;" contentEditable="false">Except for this text.</div> This can be edited as well.
</div>