帮我看看这段代码:
<script language="JavaScript">
<!--
if (document.all&&!window.print){
leftright.style.width=document.body.clientWidth-2
topdown.style.height=document.body.clientHeight-2
}
else if (document.layers){
document.leftright.clip.width=window.innerWidth
document.leftright.clip.height=1
document.topdown.clip.width=1
document.topdown.clip.height=window.innerHeight
}
function followmouse1(){
//move cross engine for IE 4+
leftright.style.pixelTop=document.body.scrollTop+event.clientY+1
topdown.style.pixelTop=document.body.scrollTop
if (event.clientX<document.body.clientWidth-2)
topdown.style.pixelLeft=document.body.scrollLeft+event.clientX+1
else
topdown.style.pixelLeft=document.body.clientWidth-2
}
function followmouse2(e){
//move cross engine for NS 4+
document.leftright.top=e.y+1
document.topdown.top=pageYOffset
document.topdown.left=e.x+1
}
if (document.all)
document.onmousemove=followmouse1
else if (document.layers){
window.captureEvents(Event.MOUSEMOVE)
window.onmousemove=followmouse2
}
function regenerate(){
window.location.reload()
}
function regenerate2(){
setTimeout("window.onresize=regenerate",400)
}
if ((document.all&&!window.print)||document.layers)
//if the user is using IE 4 or NS 4, both NOT IE 5+
window.onload=regenerate2
-->
</script>
我拷贝到我的网页上时,提示出错:leftright没有定义
为什么啊??
<script language="JavaScript">
<!--
if (document.all&&!window.print){
leftright.style.width=document.body.clientWidth-2
topdown.style.height=document.body.clientHeight-2
}
else if (document.layers){
document.leftright.clip.width=window.innerWidth
document.leftright.clip.height=1
document.topdown.clip.width=1
document.topdown.clip.height=window.innerHeight
}
function followmouse1(){
//move cross engine for IE 4+
leftright.style.pixelTop=document.body.scrollTop+event.clientY+1
topdown.style.pixelTop=document.body.scrollTop
if (event.clientX<document.body.clientWidth-2)
topdown.style.pixelLeft=document.body.scrollLeft+event.clientX+1
else
topdown.style.pixelLeft=document.body.clientWidth-2
}
function followmouse2(e){
//move cross engine for NS 4+
document.leftright.top=e.y+1
document.topdown.top=pageYOffset
document.topdown.left=e.x+1
}
if (document.all)
document.onmousemove=followmouse1
else if (document.layers){
window.captureEvents(Event.MOUSEMOVE)
window.onmousemove=followmouse2
}
function regenerate(){
window.location.reload()
}
function regenerate2(){
setTimeout("window.onresize=regenerate",400)
}
if ((document.all&&!window.print)||document.layers)
//if the user is using IE 4 or NS 4, both NOT IE 5+
window.onload=regenerate2
-->
</script>
我拷贝到我的网页上时,提示出错:leftright没有定义
为什么啊??
解决方案 »
- asp.net网站中关于角色,权限的设置是直接使用asp.net配置好,还是自己重新建表写?
- 关于session的问题
- 使用COMPONENTART:Grid控件,怎样能实现表格中的某行粗体显示?
- 我运用c#新建一个Word文档,但是报错,高手请进
- 在C#里动态生成的web控件,如何用javascript中调用它
- datagrid更新数据问题
- 我想在blog中帖一些代码,可是vs.net中的颜色怎么粘不上?有什么办法?
- 请指点:为什么session在有的页面访问得到,而在有的页面访问不到
- 怎样让页面的大小所着页面中iframe中内容的怎大而变大
- 初学。NET问:怎么在.net中加入flash
- 问一下大家用.net进行登陆验证一般都用什么来验证?
- 做过ERP或WEB开发的可以过来试试,可兼职,有报酬。
你html代码中有一个id号是leftright的标签或者控件吗?比如<div id="leftright">lalala</div>