<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>JK:支持民族工业,尽量少买X货</title>
</head><body onmousemove="mouseMoveToSelectFun(this)" >
Ctrl + 鼠标 = 选中<br>
<br>
Would you like bananas ?<br>
Would you like bananas ?<br>
Would you like bananas ?<br></body></html>
<script language=javascript>
function mouseMoveToSelectFun(obj)
{
if(!event.ctrlKey) return false;
var theRange=obj.createTextRange();
theRange.moveToPoint(event.x,event.y);
theRange.moveStart("word",-1);
theRange.moveEnd("word",1);
theRange.select();
}</script>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>JK:支持民族工业,尽量少买X货</title>
</head><body onmousemove="mouseMoveToSelectFun(this)" >
Ctrl + 鼠标 = 选中<br>
<br>
Would you like bananas ?<br>
Would you like bananas ?<br>
Would you like bananas ?<br></body></html>
<script language=javascript>
function mouseMoveToSelectFun(obj)
{
if(!event.ctrlKey) return false;
var theRange=obj.createTextRange();
theRange.moveToPoint(event.x,event.y);
theRange.moveStart("word",-1);
theRange.moveEnd("word",1);
theRange.select();
}</script>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>FTS:支持民族工业,尽量少买X货</title>
</head><body onmousemove="mouseMoveToSelectFun(this)" >
Ctrl + 鼠标 = 选中<br>
<br>
Would you like bananas ?<br>
Would you like bananas ?<br>
Would you like bananas ?<br></body></html>
<script language=javascript>
function mouseMoveToSelectFun(obj)
{
var theRange=obj.createTextRange();
theRange.moveToPoint(event.x,event.y);
theRange.expand("word");
theRange.select();
}</script>
<script language="javascript" type="text/javascript">
document.onmousemove = mouseMove;function showIt(obj)
{
var con = ['你好','世界','You','Good'];
var reg = /\d+/;
var id = obj.id.match(reg);
var t = document.getElementById("con");
t.innerText = con[parseInt(id)];
}function hiddenIt()
{
document.getElementById('con').visibility='hidden';
}function mouseMove()
{
var t = document.getElementById("con");
t.style.left = event.x-5;
t.style.top = event.y-8;
}
</script>
</HEAD><BODY>
<div id="pnode" style="position:absolute;z-index:5">
<div id="con" style="border:1px solid #CCFFFF;background:#FFFFCC;color:#55A69A;position:relative;z-index:10;width:60px;height:60px;"></div>
<span id="w0" onmouseover="showIt(this);" onmouseout="hiddenIt();" style="width:50px;">Hello</span>
<span id="w1" onmouseover="showIt(this);" onmouseout="hiddenIt();" style="width:50px;">World</span>
<span id="w2" onmouseover="showIt(this);" onmouseout="hiddenIt();" style="width:50px;">你</span>
<span id="w3" onmouseover="showIt(this);" onmouseout="hiddenIt();" style="width:50px;">好</span>
</div>
</BODY>
</HTML>
1:把它放到复制板当中去clipboardData,
2:再从中去取数据window.clipboardData.getData("Text");
3:进行后续处理;
获取数据可以用xmlhttp的方式从服务器上获取。
不过为了性能,可以预读出来放在javascript数组里。
查都懒得查就问别人,那永远当别人的学生----------------
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>JK:支持民族工业,尽量少买X货</title>
</head><body onmousemove="mouseMoveToSelectFun(this)" >
<input id=aaa >Ctrl + 鼠标 = 选中<br/>
<br/>
Would you like bananas ?<br/>
Would you like bananas ?<br/>
Would you like bananas ?<br/></body></html>
<script language=javascript>
function mouseMoveToSelectFun(obj)
{
try{
if(!event.ctrlKey) return false;
var theRange=obj.createTextRange();
theRange.moveToPoint(event.x,event.y);
theRange.moveStart("word",-1);
theRange.moveEnd("word",1);
theRange.select();
aaa.value=theRange.text;
}
catch(e)
{
}
}</script>