AJAX实现窗口的拖动

<script>function StorePage(){d=document;t=d.selection?(d.selection.type!='None'?d.selection.createRange().text:''):(d.getSelection?d.getSelection():'');void(keyit=window.open('http://www.365key.com/storeit.aspx?t='+escape(d.title)+'&u='+escape(d.location.href)+'&c='+escape(t),'keyit','scrollbars=no,width=475,height=575,left=75,top=20,status=no,resizable=yes'));keyit.focus();}</script>

<html>
<head>
<script type="text/JavaScript"><!--
//注意,这里没有使用通用的捕获鼠标的模式,只是获取就算。
var d=0;
function move(f){
if(f==1){
d=1;
}else if(f==2){
d=0;
}else if(f==0&&d==1){
me.style.posLeft=document.body.scrollLeft+event.clientX;
me.style.posTop=document.body.scrollTop+event.clientY;
}
}
//--></script>

</head>
<body onmousemove="move(0)" onmousedown="move(1)" onmouseup="move(2)">
<div ID="me" style="position: absolute; left: 200px; top: 120px; width:300px; height:200px; visiblity: visible;">
<table border="1" width="100%" height="100%">
<tr><td>请你进行拖拽</td></tr>
<tr height="100%"><td>这可是一个会动的窗体啊</td></tr>
<tr><td></td></tr>
</table>
</div>
</body>
</html>

你可能感兴趣的:(JavaScript,html,c,Ajax,F#)