有谁自己写过拖动层的javascript,不是用dm生成的 迷失老大的例子:http://www.csdn.net/expert/topic/992/992425.xml?temp=.9719049 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 var ms=0;function did(obj){//¿ØÖÆÒ³ÃæµÄÒªËصÄÒƶ¯ ms=obj; event.srcElement.setCapture(); x=document.all(ms).style.pixelLeft-event.x; y=document.all(ms).style.pixelTop-event.y; }function document.onmousemove(){ if(ms!=""){ document.all(ms).style.pixelLeft=x+event.x; document.all(ms).style.pixelTop=y+event.y; } }function document.onmouseup(){ if(ms!=""){ event.srcElement.releaseCapture(); ms=0; } }================================调用方式在需要调用的要素里面加上onmousedown=did("要素的id")及可 flashsoft2000(FS2K)的方法可行,谢谢大家!不过这句是什么意思?//¿ØÖÆÒ³ÃæµÄÒªËصÄÒƶ¯ 还有个问题:页面上的层不管z-index为多少,总是处于select对象的下面,看起来很不美观,不知道能不能解决 这段代码倒计时速度太慢,哪里出问题了。 javascript验证输入是否是中文 js 求救!! 有无脚本调用IE的“编辑”-》“查找(Ctrl+F)”功能? 如何让ctrl+v失效? 很简单的一个特效,大家帮我看看,在线等待! show()函数有什么用 onbeforeunload方法问题 基于百度地图自由标注并显示文字、图片 如何知道点了浏览器右上角的关闭按钮? 如何动态设定<input name=name[1]>的值???
function did(obj){//¿ØÖÆÒ³ÃæµÄÒªËصÄÒƶ¯
ms=obj;
event.srcElement.setCapture();
x=document.all(ms).style.pixelLeft-event.x;
y=document.all(ms).style.pixelTop-event.y;
}function document.onmousemove(){
if(ms!=""){
document.all(ms).style.pixelLeft=x+event.x;
document.all(ms).style.pixelTop=y+event.y;
}
}function document.onmouseup(){
if(ms!=""){
event.srcElement.releaseCapture();
ms=0;
}
}
================================
调用方式在需要调用的要素里面加上
onmousedown=did("要素的id")及可
//¿ØÖÆÒ³ÃæµÄÒªËصÄÒƶ¯