摘要:
1 function getSelectedText(textbox) {2 if (document.selection) {3 return document.selection.createRange().text;4 } else {5 return textbox.value.substring(textbox.selectionStart,textbox.selectionEnd);6 }7 }IE9之前不提供selectionStart,selectionEnd属性下面是根据起始位置和结束位置选取字符串: 1 function selectText(textbox, startI 阅读全文
posted @ 2011-05-15 15:09
HelloWorld.Michael
阅读(511)
评论(0)
推荐(0)

浙公网安备 33010602011771号