function ddInit(e){
topDog=isIE ? "BODY" : "HTML";
whichDog=document.all.theLayer;
hotDog=isIE ? event.srcElement : e.target;
while (hotDog.id!="titleBar"&&hotDog.tagName!=topDog){
hotDog=isIE ? hotDog.parentElement : hotDog.parentNode;
}
if (hotDog.id=="titleBar"){
offsetx=isIE ? event.clientX : e.clientX;
offsety=isIE ? event.clientY : e.clientY;
nowX=parseInt(whichDog.style.left);
nowY=parseInt(whichDog.style.top);
ddEnabled=true;
document.onmousemove=dd;
}
}
我是个菜鸟对于js不是很熟练,这是在网上找到的一段代码,但当我拖动滚动条的时候就会出现脚本错误,提示缺少对象,我测试了一下是因为whichDog这个对象造成的还望各位大虾能帮我解决
topDog=isIE ? "BODY" : "HTML";
whichDog=document.all.theLayer;
hotDog=isIE ? event.srcElement : e.target;
while (hotDog.id!="titleBar"&&hotDog.tagName!=topDog){
hotDog=isIE ? hotDog.parentElement : hotDog.parentNode;
}
if (hotDog.id=="titleBar"){
offsetx=isIE ? event.clientX : e.clientX;
offsety=isIE ? event.clientY : e.clientY;
nowX=parseInt(whichDog.style.left);
nowY=parseInt(whichDog.style.top);
ddEnabled=true;
document.onmousemove=dd;
}
}
我是个菜鸟对于js不是很熟练,这是在网上找到的一段代码,但当我拖动滚动条的时候就会出现脚本错误,提示缺少对象,我测试了一下是因为whichDog这个对象造成的还望各位大虾能帮我解决
解决方案 »
- 一个网站有中文和英文两个域名,在英文域名下cookies有效,在中文下就没效
- 一个面试题,请教如何解决
- 关于枚举用法的一个简单问题!
- crystalReportViewer 中如何取消选择报表项目内容时出现的选择虚线?
- C#中如何将数据(数组元素)存到以.ini 结尾的文件中去????谢谢了``
- 一个 C# 的Winform系统,欲找有丰富经验的C#高手合作
- C#中直接调用VB.NET的函数, wuyi8808请进接分
- 高分求水晶报表(CrystalReports)软件或下载地址!
- 我的帖子呢 在哪里申明我的线程对象
- 有没有方法读出向一张表INSERT时由于存在不可空字段而出错的出错信息中触发错误的不可空字段的字段名?
- 信息存到xml上 怎么会是这样的结果???
- 做好的C/S结构的项目,如何才能在没有装framwork的机器上运行?
帮助lz顶一下
你的dd定义了吗