2
我有這樣的片段:jQuery的範圍內選擇一個元素CONTENTEDITABLE =「假」
<div contenteditable="true"> father
<a contenteditable="false" href="#"> myLink </a>
</div>
我的問題是,如果我把插入符後
</a>
,我要儘量退格爲刪除myLink的html標記,它在Firefox中不起作用,但它可以在chorme,opera,safari和explorer中工作。 如果在Firefox中我選擇
<a contenteditable="false" href="#"> myLink </a>
,然後用退格它的工作原理刪除其他手!
可能的解決方法是在元件的範圍選擇
<a contenteditable="false" href="#"> myLink </a>
編程當用戶位退格鍵。
我該如何在jQuery中做到這一點? 如果光標光標後
</a>
和用戶數字退格我想選擇
<a contenteditable="false" href="#"> myLink </a>
,並刪除該節點。