<a href=# onmousemove=selectMe()>aaaaaaaaaaaaaaaaaaaaa</a>
<a href=# onmousemove=selectMe()>bbbbbbbbbbbbbbbbbbbb</a>
<a href=# onmousemove=selectMe()>vvvvvvvvvvvvvvvvvvvv</a>
<a href=# onmousemove=selectMe()>ccccccccccccccccccccc</a>
<a href=# onmousemove=selectMe()>ddddddddddddddddddddd</a><script>
function selectMe() {
var r=document.body.createTextRange();
r.moveToPoint(window.event.x, window.event.y);
r.expand("word");
r.select();
}
</script>
<a href=# onmousemove=selectMe()>bbbbbbbbbbbbbbbbbbbb</a>
<a href=# onmousemove=selectMe()>vvvvvvvvvvvvvvvvvvvv</a>
<a href=# onmousemove=selectMe()>ccccccccccccccccccccc</a>
<a href=# onmousemove=selectMe()>ddddddddddddddddddddd</a><script>
function selectMe() {
var r=document.body.createTextRange();
r.moveToPoint(window.event.x, window.event.y);
r.expand("word");
r.select();
}
</script>
解决方案 »
- 问个关于JS比较日期大小的问题!(急)
- 请教如何写jquery插件!需要注意些什么?
- 哪位资深人士能说下Ext的优缺点吗?
- firefox文本框无法清空,怎么回事,ie正常?再简单不过了,狗屁ff.doucument.getElementById('txtBox').value="",居然没有效果,怎么解决
- java 如何获取 ACTIVEX事件中传递的参数?
- 怎么样给<input type="file" name="file1">设置初始值?
- js能不能把HTC当作一个对象,然后new一个调用HTC相应的函数方法?
- 请大家帮忙,这个问题怎么解决?
- 求助!我在鼠标滑过,显示二级导航菜单遇到的问题
- Extjs 监听file的change事件是怎么 无效果
- 一个页面在不是最大化的情况下提交给下一个页面,怎么让下一个页码最大化。急!!
- 请问,鼠标移到图片时,此图片放大,鼠标离开图片时,此图片还原,这效果如果实现??
我现在是可以选中了,但只选中了一部分,如链接的文字是aaa.exe,则只选中了exe??
怎么办?
页面显示为:链接的aaa.exe我是想鼠标以上去时,将aaa.exe全部选中!
<a href=# onmousemove=selectMe()>aaaaaaaaaaaaaaaaaaaaa.</a>
<a href=# onmousemove=selectMe()>bbbbbbbbbbbbbbbbbbbb.</a>
<a href=# onmousemove=selectMe()>ggg.exe.</a>
<a href=# onmousemove=selectMe()>ccccccccccccccccccccc.</a>
<a href=# onmousemove=selectMe()>ddddddddddddddddddddd.</a>
<script>
function selectMe() {
var r=document.body.createTextRange();
r.moveToPoint(window.event.x, window.event.y);
r.expand("sentence");
r.select();
}
</script>
文本框<input>也有.select()方法,
链接<a>为什么就没有呢?