日期:2014-05-20  浏览次数:20430 次

求助ASP.NET2.0里JavaScript和html的问题
js   如下:
<script   type= "text/javascript "   language=javascript>
        function   lqdellmove(){
if(!document.ns){
lqdel.style.top=document.body.scrollTop+150;
lqdel.style.left=document.body.scrollLeft+15;
lqder.style.top=document.body.scrollTop+150;
lqder.style.left=document.body.scrollLeft+document.body.clientWidth-90;
}
setTimeout( 'lqdellmove(); ',200)}
document.write( " <div   id=lqdel   style= 'position:   absolute;visibility:   visible;z-index:1;line-height:100% '> <a   href= 'http://www.zbball.com/ '   target=_blank> <img   src= 'ad/zbball.gif '   border= '0 '   width=80   height=80> </a> <br> <br> <a   href= 'http://www.2222168.com/ '   target=_blank> <img   src= 'ad/2222168.gif '   border= '0 '   width=80   height=90> </a> div> ");
document.write( " <div   id=lqder   style= 'position:   absolute;visibility:   visible;z-index:1;line-height:100% '> <a   href= 'http://www.zyzq888.cn/ '   target=_blank> <img   src= 'ad/zyzq888.gif '   border= '0 '   width=80   height=80> </a> <br> <br> <a   href= 'http://www.tip99.com/ '   target=_blank> <img   src= 'ad/tip99.gif '   border= '0 '   width=80   height=90> </a> div> ");
lqdellmove();
        </script>  

这段js效果是浮动广告,可以在页面两边浮动。
我Default.aspx页调用这段js,运行后,能显示出图,但是没有浮动的效果.
Default.aspx页最上面有句
<!DOCTYPE   html   PUBLIC   "-//W3C//DTD   XHTML   1.1//EN "   "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd ">
我把这句去掉然后运行浮动广告就出来了,但是我去掉了这句我的页面样式就无效了,请问我该怎么办?

------解决方案--------------------
document.documentElement.