document.selection 和getSelection 的demo
来源:互联网 发布:网络刷客 编辑:程序博客网 时间:2024/05/22 07:41
setInterval(function(){
var text;
if(!!document.selection)
{
var selObj = document.selection.createRange();
text = selObj.text;
}
else{
var selObj = window.getSelection();
text = selObj.toString();
}
document.getElementById('log').innerHTML = text;
//console.log(selObj.anchorOffset);
var text;
if(!!document.selection)
{
var selObj = document.selection.createRange();
text = selObj.text;
}
else{
var selObj = window.getSelection();
text = selObj.toString();
}
document.getElementById('log').innerHTML = text;
//console.log(selObj.anchorOffset);
},3000);
firefox
https://developer.mozilla.org/en/DOM/Selection
ie
http://blog.csdn.net/birdwawe/article/details/7027935
- document.selection 和getSelection 的demo
- document.getSelection,document.selection.createRange
- document.getSelection,document.selection.createRange
- document.selection和window.getSelection属性和方法详解
- 屏幕取词: window.getSelection和document.selection
- 网页中获取当前选取的内容 document.getSelection,document.selection.createRange
- getSelection和range的笔记
- ff下的document.selection
- document.selection对象的介绍
- document.selection
- document.selection
- document.selection
- ckeditor4.6.2在extjs2的tab页,报错this.document.getWindow().$.getSelection() undefined
- document.selection 的 createRange()方法汇总
- DHTML之-----document.selection 的 createRange
- 关于document.selection对象的介绍
- document.selection.createRange方法
- document.selection.createRange
- 安装Ubuntu的一些问题
- 查看MSSQL数据库每个表占用的空间大小
- shell脚本学习每日一句(2)
- DES加解密(Java)
- 母函数(Generating function)详解
- document.selection 和getSelection 的demo
- ActiveMQ之Ajax调用
- linux 消息队列实例
- 我的VC花指令方法,VC花指令,反跟踪技术
- jsp里的变量
- 在iOS上实现瀑布流界面
- HDU-1002
- <zz>machine learning中的重要延伸模型
- OpenCV简介