文字作移的教本怎么不起作用哪? document.getElementById("aa").style.left = document.getElementById("aa").style.left + 1;这句话有语法错误吗? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 但是你看这个例子就知道了<!--左边的广告 开始--><DIV id=ad_dl01 style="Z-INDEX: 1; LEFT: 5px; VISIBILITY: visible; WIDTH: 100px; POSITION: absolute; TOP: 95px"><TABLE cellSpacing=0 cellPadding=0 width=100 border=0> <TBODY> <TR> <TD align=left><A onclick="ad_dl01.style.visibility='hidden'"><IMG height=16 src="第二书店--中国最专业计算机图书网上专营店.files/yanglan_01.gif" width=100 border=0></A></TD></TR> <TR> <TD><A href="http://www.dearbook.com.cn/2006/daigou.htm" target=_blank><IMG height=184 src="第二书店--中国最专业计算机图书网上专营店.files/duilian2.gif" width=100 border=0></A></TD></TR></TBODY></TABLE></DIV><!--左边的广告 结束--><!--左右广告的移动操作开始--><SCRIPT type=text/javascript>var step_ratio = 0.1;objs = new Array();objs_x = new Array();objs_y = new Array();//name表示广告条,x,y代表在画面中广告条移动的目的位置function addfollow(name, x, y) { i = objs.length; objs[i] = document.getElementById(name); objs_x[i] = x; objs_y[i] = y;}function follow() { for(var i=0; i<objs.length; i++) { var fm = objs[i]; var fm_x = objs_x[i]; var fm_y = objs_y[i]; if (fm.offsetLeft != document.body.scrollLeft + fm_x) { var dx = (document.body.scrollLeft + fm_x - fm.offsetLeft) * step_ratio; dx = (dx > 0 ? 1 : -1) * Math.ceil(Math.abs(dx)); fm.style.left = fm.offsetLeft + dx; } if (fm.offsetTop != document.body.scrollTop + fm_y) { var dy = (document.body.scrollTop + fm_y - fm.offsetTop) * step_ratio; dy = (dy > 0 ? 1 : -1) * Math.ceil(Math.abs(dy)); fm.style.top = fm.offsetTop + dy; } fm.style.display = ''; }}addfollow("ad_dl01", 5, 180);setInterval('follow()',20); <DIV id=ad_dl01 style="Z-INDEX: 1; LEFT: 5px; VISIBILITY: visible; WIDTH: 100px; POSITION: absolute; TOP: 95px">POSITION: absolute 注意这个,他是有这个才能动的 <html><head></head><body><div id="aa"><table> <tr> <td>jintian</td><td>明天</td> </tr></table></div><div id="ab">鸟1</div><script>function dde(){ alert(document.getElementById("aa").style.left); document.getElementById("aa").style.left=document.getElementById("aa").style.left+100;}</script><A onclick="dde(); return false;">移动</A></body></html>======<div id="aa" style="position:absolute">//关键 <html><head><LINK rel="NEXT" href="http://www.sina.com"></head><body><DIV id=ab style="Z-INDEX: 1; RIGHT: 5px; VISIBILITY: visible; WIDTH: 100px; POSITION: absolute; TOP: 95px;"><TABLE cellSpacing=0 cellPadding=0 width=100 border=0> <TBODY> <TR> <TD align=right><A onclick="ab.style.visibility='hidden'"><IMG height=16 src="http://image2.sina.com.cn/sms/sinapic/27120507-index.jpg" width=100 border=0></A></TD></TR> <TR> <TD><A href="http://www.dearbook.com.cn/pile/default.aspx" target=_blank><IMG height=184 src="http://image2.sina.com.cn/ty/up/2006-05-27/U339P6T64D20401F1091DT20060527113609.jpg" width=100 border=0></A></TD></TR></TBODY></TABLE></DIV><script>var i=0;function dde(){ i=i+100; getElementById("ab").style.top = i;}</script><A onclick="dde(); return false; ">移动</A></body></html>这个也不好使啊,怎么改? QQ邮箱中的一个效果谁能实现?在线等 javascript 中 layerX layerY 问题?? 求教各位高手一个问题 史上最牛js判断:js怎么判断IE7和FF关闭还是刷新? 履行承诺,feng13555兄弟近来拿分(2) jquery里tab的close事件怎么用? 求教,JQ如何在追加INPUT里的VALUE 求一javascript字符串比较函数 关于js中的三目运算 关于函数的回调 在线等待,按钮单击事件和页面双击事件冲突 关于javascript打字系统的声音问题.
<DIV id=ad_dl01 style="Z-INDEX: 1; LEFT: 5px; VISIBILITY: visible; WIDTH: 100px; POSITION: absolute; TOP: 95px">
<TABLE cellSpacing=0 cellPadding=0 width=100 border=0>
<TBODY>
<TR>
<TD align=left><A onclick="ad_dl01.style.visibility='hidden'"><IMG
height=16 src="第二书店--中国最专业计算机图书网上专营店.files/yanglan_01.gif" width=100
border=0></A></TD></TR>
<TR>
<TD><A href="http://www.dearbook.com.cn/2006/daigou.htm"
target=_blank><IMG height=184
src="第二书店--中国最专业计算机图书网上专营店.files/duilian2.gif" width=100
border=0></A></TD></TR></TBODY></TABLE></DIV>
<!--左边的广告 结束--><!--左右广告的移动操作开始-->
<SCRIPT type=text/javascript>
var step_ratio = 0.1;
objs = new Array();
objs_x = new Array();
objs_y = new Array();//name表示广告条,x,y代表在画面中广告条移动的目的位置
function addfollow(name, x, y) {
i = objs.length;
objs[i] = document.getElementById(name);
objs_x[i] = x;
objs_y[i] = y;
}function follow() {
for(var i=0; i<objs.length; i++) {
var fm = objs[i];
var fm_x = objs_x[i];
var fm_y = objs_y[i]; if (fm.offsetLeft != document.body.scrollLeft + fm_x) {
var dx = (document.body.scrollLeft + fm_x - fm.offsetLeft) * step_ratio;
dx = (dx > 0 ? 1 : -1) * Math.ceil(Math.abs(dx));
fm.style.left = fm.offsetLeft + dx;
} if (fm.offsetTop != document.body.scrollTop + fm_y) {
var dy = (document.body.scrollTop + fm_y - fm.offsetTop) * step_ratio;
dy = (dy > 0 ? 1 : -1) * Math.ceil(Math.abs(dy));
fm.style.top = fm.offsetTop + dy;
}
fm.style.display = '';
}
}addfollow("ad_dl01", 5, 180);
setInterval('follow()',20);
POSITION: absolute 注意这个,他是有这个才能动的
<head>
</head><body><div id="aa">
<table>
<tr>
<td>jintian</td><td>明天</td>
</tr>
</table>
</div>
<div id="ab">鸟1</div><script>
function dde()
{
alert(document.getElementById("aa").style.left);
document.getElementById("aa").style.left=document.getElementById("aa").style.left+100;
}
</script><A onclick="dde(); return false;">移动</A></body>
</html>
======
<div id="aa" style="position:absolute">//关键
<head>
<LINK rel="NEXT" href="http://www.sina.com">
</head>
<body>
<DIV id=ab style="Z-INDEX: 1; RIGHT: 5px; VISIBILITY: visible; WIDTH: 100px; POSITION: absolute; TOP: 95px;">
<TABLE cellSpacing=0 cellPadding=0 width=100 border=0>
<TBODY>
<TR>
<TD align=right><A onclick="ab.style.visibility='hidden'"><IMG
height=16 src="http://image2.sina.com.cn/sms/sinapic/27120507-index.jpg" width=100
border=0></A></TD></TR>
<TR>
<TD><A href="http://www.dearbook.com.cn/pile/default.aspx"
target=_blank><IMG height=184
src="http://image2.sina.com.cn/ty/up/2006-05-27/U339P6T64D20401F1091DT20060527113609.jpg" width=100
border=0></A></TD></TR></TBODY></TABLE></DIV><script>
var i=0;
function dde()
{
i=i+100;
getElementById("ab").style.top = i;
}
</script><A onclick="dde(); return false; ">移动</A></body>
</html>这个也不好使啊,怎么改?