我有一个div editablecontent,它有以下代码
<span id="id1">Hello </span>
<span id="id2">there </span>
<span id="id3">how </span>
<span id="id4">are </span>
<span id="id5">you? </span>
现在问题是当光标位于其中一个跨度内时我按下回车键,我希望它是
<span id="id1">Hel[enter pressed here]</span>
<span id="xx">lo </span>
<span id="id2">there </span>
<span id="id3">how </span>
<span id="id4">are </span>
<span id="id5">you? </span>
所以它会检测你是否在跨度中将跨度拆分为新的?
答案 0 :(得分:0)