看这个教程:http://www.1studio.net/html/example/0009/0009.htm
解决方案 »
- 大家好 Jquery 有个脚本错误 麻烦看下
- 100分请教一个问题
- 为什么我的日历<script language="javascript" src=../script/rili.js></script>引用后,没有反应,必须<script language="JavaScript">这
- vbscript数组变量传递到javascript问题给100分
- 郁闷了几天的问题 !高手进
- 这种表达式是啥意思
- 下拉列表与层的关系?
- 50分@,请教在代码中中如何把把变量清空,或者把变量复位!open一个窗口是否父宣窗口变量清空!
- 与frame有关的一个问题
- 请教大虾,javascript 中类的使用方式!!
- 复选框问题...谢谢 !
- 如何才能做出像榕树下这种效果的---Alt="aaa",请教高手!
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<SCRIPT language=JavaScript>
<!--//
var x = 0;
var y = 0;
var limdex = 1232;
var dest = 0;
var distance = 0;
var step = 0;
var destination = 0;
var on = true;function scrollit(destination) {
step = 2;
dest = destination;
if (x<dest & x < limdex){
while (x<dest) {
step += (step / 7);
x += step;
parent.frames[1].scroll(x,0);
}
// top.main.scroll(dest,0);
if(dest <=limdex) { parent.frames[1].scroll(dest,0); }
x = dest;
}
if (x > dest) {
while (x>dest) {
step += (step / 7);
if(x >= (0+step)) { x -= step; parent.frames[1].scroll(x,0); }
else break;
}
if(dest >= 0) { parent.frames[1].scroll(dest,0); }
x = dest;
}
if (x<1) { parent.frames[1].scroll(1,0); x=1 }
if (x>limdex) { parent.frames[1].scroll(limdex,0); x=limdex }
x = dest;
}function scrollnow() {
if (on){
if (x < limdex & x >= 0 ) {
parent.frames[1].scroll(x,0);
x = x + 1;
setTimeout('scrollnow()', 8);
}
else if (x < 0) {
x = limdex;
scrollnow();
}
else {
x=0;
scrollnow();
}
}}// *********************************
// 去掉原来的stopscroll()
function stopscroll() {
if (on){
on = false;
}
else {
on = true;
scrollnow();
}
}
function startscroll() { on = true; scrollnow(); }
function stop_start() {
if (on){ on = false;}else { on = true;scrollnow();}
}
//***********************************//--></SCRIPT>
<link rel="stylesheet" href="/tvnet.css" type="text/css">
<META content="MSHTML 5.50.4134.600" name=GENERATOR></HEAD>
<BODY leftMargin=0 topMargin=0 onload=scrollnow() marginwidth="0" marginheight="0" bgColor=#2d5983>
<TABLE cellSpacing=0 cellPadding=0 width=750 border=0>
<TR>
<TD width=315 bgColor=#2d5983></TD>
<TD width=120 align=center bgColor=#2d5983><A href="javascript:scrollit(x-150%20+%20y)"><IMG height=23 src="menu.files/img_btn_leftarrow.gif" width=36 border=0 name=img_btn_leftarrow></A><A href="javascript:stopscroll()"><IMG height=23 src="menu.files/img_btn_stop.gif" width=38 border=0 name=img_btn_stop alt="暂停滚动"></A><A href="javascript:scrollit(x+150%20+%20y)"><IMG height=23 src="menu.files/img_btn_rightarrow.gif" width=36 border=0 name=img_btn_rightarrow></A>
</TD>
<TD width=315 align=right bgColor=#2d5983><A HREF="http://www.tvnet.com.cn/" onmouseover="window.event.srcElement.title='中国影视网';return true" target=_top><span class=sans>Powered By TVnet.com.cn</FONT></span></A> </TD>
</TR>
</TABLE>
</BODY></HTML>