معلومات المنتج:
وظيفة getSelectedText () {// تم استعارة رمز الوظيفة هذا من: http://www.codetoad.com/javascript_get_selected_text.asp
فار تكست = "";
إذا (window.getSelection) {
txt = window.getSelection();
} وإلا إذا (window.document.getSelection) {
txt = window.document.getSelection();
} وإلا إذا (window.document.selection) {
txt = window.document.selection.createRange().text;
}
إرجاع النص؛
}