неправильное выделение TextArea
var textArea = document.getElementById("txt_from"); var selecttxt = textArea.value.substr(textArea.selectionStart,textArea.selectionEnd); alert(selecttxt); если выделено первое слово, то все нормально, а при выделении других частей, дает неправильный результат |
сделал
var textArea = document.getElementById("txt_from"); var selecttxt = textArea.value.substr(textArea.selectionStart,textArea.selectionEnd - textArea.selectionStart); alert(selecttxt); |
Часовой пояс GMT +3, время: 17:08. |