選択状態のテキストを取得する // IE
if (document.selection) {
var text = document.selection.createRange().text;
// それ以外
} else {
var text = document.getSelection();
}
選択範囲オブジェクトを取得するにはvar selection_obj = windows.getSelection(); |
|
選択状態のテキストを取得する // IE
if (document.selection) {
var text = document.selection.createRange().text;
// それ以外
} else {
var text = document.getSelection();
}
選択範囲オブジェクトを取得するにはvar selection_obj = windows.getSelection(); |
|