这个需求不是30分的需求……楼下的来解答……
解决方案 »
- 发布一套js+jq写的客户端控件(针对ASP.NET)
- 唉,高兴早了,嵌套框架传递JS变量值,请高人指点……
- 关于frame的js问题
- createTextRange()是什么意思,谁能给出它的一些用法,最好全点
- 有没有可能跨框架显示
- 救命:浏览器扩大缩小的时候,怎么控制一行字数增加和缩小
- 页面刷新后,如何打开原有的窗口?
- 如何设置窗口在30秒无鼠标或键盘响应的情况下自动关闭?
- ???????????????????????????????????????????????????我是菜鸟所以我问??????????????????????????????????????????????????????????
- 动态渲染关联的下拉表单
- 函数变量与字符串相加的问题
- javascript <验证IP地址的正则表达式>
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>JK:支持民族工业,尽量少买X货</title>
<style>
.removableObj
{
height:25;position:relative;
}
</style>
<script language="javascript">
var beginMoving=false;
var sourceObj=null;
var objectObj=null;
var objectObj2=null;
function MouseDownToMove(obj){
obj.style.zIndex=1;
obj.mouseDownY=event.clientY;
obj.mouseDownX=event.clientX;
beginMoving=true;
obj.setCapture();
sourceObj=obj;
objectObj=null;
}function MouseMoveToMove(obj){
if(!beginMoving) return false;
obj.style.top = (event.clientY-obj.mouseDownY);
obj.style.left = (event.clientX-obj.mouseDownX);
}
function MouseUpToMove(obj){
if(!beginMoving) return false;
obj.releaseCapture();
obj.style.top=0;
obj.style.left=0;
obj.style.zIndex=0;
beginMoving=false;
window.setTimeout("swapFun()",20);
}function MouseOverFun(obj)
{
if(obj==sourceObj) return false;
objectObj=obj;
}function MouseOverFun2(obj)
{
objectObj2=obj;
}function swapFun()
{
if(sourceObj!=null && objectObj!=null) objectObj.insertAdjacentElement("beforeBegin",sourceObj);
else if(sourceObj!=null && objectObj2!=null) objectObj2.insertAdjacentElement("beforeEnd",sourceObj);
sourceObj=null;
objectObj=null;
objectObj2=null;
}
</script>
</head><body><table border="1" width="100%" height="25">
<tr>
<td width="34%" valign="top" height="25" onmouseover="MouseOverFun2(this);" >
<table border="1" width="100%" class="removableObj" onmousedown='MouseDownToMove(this)' onmousemove='MouseMoveToMove(this)' onmouseup='MouseUpToMove(this);' onmouseover="MouseOverFun(this);" >
<tr>
<td width="23%">1</td>
<td width="21%">2</td>
</tr>
<tr>
<td width="23%"> </td>
<td width="21%"> </td>
</tr>
</table>
</td>
<td width="32%" valign="top" height="25" onmouseover="MouseOverFun2(this);" >
<table border="1" width="100%" class="removableObj" onmousedown='MouseDownToMove(this)' onmousemove='MouseMoveToMove(this)' onmouseup='MouseUpToMove(this);' onmouseover="MouseOverFun(this);" >
<tr>
<td width="21%" height="17">3</td>
</tr>
<tr>
<td width="21%">4</td>
</tr>
</table>
</td>
<td width="34%" valign="top" height="25" onmouseover="MouseOverFun2(this);" >
<table border="1" width="100%" class="removableObj" onmousedown='MouseDownToMove(this)' onmousemove='MouseMoveToMove(this)' onmouseup='MouseUpToMove(this);' onmouseover="MouseOverFun(this);" >
<tr>
<td width="100%">5</td></tr>
<tr>
<td width="100%"></td></tr>
</table>
</td>
</tr>
</table>
</body>
</html>
这是我从网上当的代码,但这个只能插入而不能互换位置