javascript 定位问题
程序代码:
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <title</title> </head> <body> <div id=divStay style="POSITION: absolute"> </div> <SCRIPT language=javascript> function picsize(obj,MaxWidth){ img=new Image(); img.src=obj.src; if (img.width>MaxWidth) { return MaxWidth; } else { return img.width; } } </SCRIPT> <div id="divStayTopleft" style="POSITION: absolute; width: 267px;"> <script src="../SpryAssets/SpryMenuBar.js" type="text/javascript"></script> <link href="../SpryAssets/SpryMenuBarVertical.css" rel="stylesheet" type="text/css"> <table border="0"> <tr> <td><ul id="MenuBar1" class="MenuBarVertical"> <li><a href="index.asp">首页</a></li> <li><a href="#">项目 2</a></li> <li><a class="MenuBarItemSubmenu" href="#">项目 3</a> <ul> <li><a class="MenuBarItemSubmenu" href="#">项目 3.1</a> <ul> <li><a href="#">项目 3.1.1</a></li> <li><a href="#">项目 3.1.2</a></li> </ul> </li> <li><a href="#">项目 3.2</a></li> <li><a href="#">项目 3.3</a></li> </ul> </li> <li><a href="#">项目 4</a></li> </ul> </td> </tr> </table> <script type="text/javascript"> <!-- var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgRight:"../SpryAssets/SpryMenuBarRightHover.gif"}); //--> </script> </div> <table width="950" border="1" align="center" bordercolor="#FF0000"> <tr> <td> </td> </tr> <tr> <td> </td> </tr> <tr> <td> </td> </tr> </table> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <script type="text/javascript"> function FloatTop() { var startX1 =document.body.offsetWidth-125 ,startY1 = 5; var startX2 =0,startY2 = 95; var ns = (navigator.appName.indexOf("Netscape") != -1); var d = document; function ml(id,startX,startY) { var el=d.getElementById?d.getElementById(id):d.all?d.all[id]:d.layers[id]; if(d.layers)el.style=el; el.sP=function(x,y){this.style.left=x;this.style.top=y;}; el.x = startX; el.y = startY; return el; } window.stayTopLeft=function() { var pY = ns ? pageYOffset : document.body.scrollTop; ftlObj.y += (pY + startY1 - ftlObj.y)/8; ftlObj1.y += (pY + startY2 - ftlObj1.y)/8; ftlObj.sP(document.body.scrollLeft+document.body.offsetWidth-125, ftlObj.y); ftlObj1.sP(ftlObj1.x, ftlObj1.y); setTimeout("stayTopLeft()", 30); } ftlObj = ml("divStay",document.body.scrollLeft+document.body.offsetWidth-125,0); ftlObj1 = ml("divStayTopLeft",0,30); // ftlObj = ml("divStay",(document.body.scrollLeft+document.body.offsetWidth)/2+379,0); //ftlObj1 = ml("divStayTopLeft",(document.body.scrollLeft+document.body.offsetWidth)/2+379,30); stayTopLeft(); } FloatTop(); </script> </body> </html>上面的代码运行之后的效果是 我想让那个滚动的部分和表格对齐,请问代码了javascript部分怎么改 我改了没效果