求jsp页面拖拉排序的js
求jsp页面 对列表实行拖拉排序的js 用jquery实现,谢了
求jsp页面 对列表实行拖拉排序的js 用jquery实现,谢了
答案:jquery官方的jquery-ui就有这个功能,下下来,看里面的demo就行了
其他:这里正好有个实例,,你去看看吧。
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>40701442张晓军</title>
<script language="javascript">
////////////////////////////////////////////////鼠标移动
function Mmove()
{
if (event.button==1&&movebale)
{
plane1.style.pixelLeft=tempx+event.clientX-x;
plane1.style.pixelTop=tempy+event.clientY-y;
}
}
function drags()
{
movebale=true;
plane1=myplane
tempx=plane1.style.pixelLeft;
tempy=plane1.style.pixelTop ;
x=event.clientX;
y=event.clientY;
}
function Mup()
{
movebale=false;
}
////////////////////////////////////////////////键盘移动
function getplane()
{
plane2=myplane.style;
myplane.focus();
cwidth=parseInt(document.documentElement.clientWidth);////////////////浏览器窗口Width和Height
cheight=parseInt(document.documentElement.clientHeight);
planewidth=parseInt(plane2.width);
planeheight=parseInt(plane2.height);
}
function keydown()
{
X =plane2.pixelLeft;
Y =plane2.pixelTop;
key=event.keyCode;
Kmove(key);
}
function Kmove(key)///////减去飞机的Width和Height为了增强观赏性,慢慢的从窗口中出来。
{
if (key==37)
{
if(X<=0-planewidth)
X=cwidth;
plane2.left = X-=5;
}
if (key==38)
{
if(Y<0-planeheight)
Y=cheight;
plane2.top = Y-=5;
}
if (key==39)
{
if(X>=cwidth)
X=0-planewidth;
plane2.left = X+=5;
}
if (key==40)
{
if(Y>=cheight)
Y=0-planeheight;
plane2.top = Y+=5;
}
}
</script>
</head>
<body onLoad="getplane()" onResize="getplane()" background="back.gif" scroll="no">
<div id="myplane" onMouseMove="Mmove();" onMouseDown="drags();" onKeyUp="Mup();"
onKeyDown="keydown()"style="width:155px; height: 48px; background-image:url(plane.gif);
position:absolute; cursor:w-resize; left: 96px; top: 98px;">
</div>
</body>
</html>
上一个:jsp页面显示上次时间出现乱码
下一个:jsp页面中,如何让浏览器中的滚动条隐藏,但是要显示div的滚动条。 也可以显示浏览器的,但要表头不动啊。