欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

javascript中獲取選中對象的類型

 更新時間:2007年04月02日 00:00:00   作者:  
在Javascript中 利用 document.selection 可以創(chuàng)建 textRange。 但其實不是什么時候都可以創(chuàng)建的。
我們可以利用 document.selection.type 來判斷當前選中的是文本還是對象。

document.selection.type 返回三個值 "None" "Text" "Control"

只有當返回值是 Text 時,創(chuàng)建的textRange才是有效的。

相關(guān)文章

最新評論