您的位置:首页 > 其它

点击可上下左右滚动的新闻图片列表

2010-05-25 11:58 417 查看
http://www.mini88s.cn/news_list.asp?id=994 效果演示

具体代码

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<style type="text/css">
td {font-size: 12px;}
.opacity {COLOR: #4AAAC5; FILTER: alpha(opacity=100)}
.solid-top {BORDER-TOP: #CCCCCC 1px solid}
.solid-right {BORDER-RIGHT: #CCCCCC 1px solid}
.solid-bottom {BORDER-BOTTOM: #CCCCCC 1px solid}
.solid-left {BORDER-LEFT: #CCCCCC 1px solid}
</style>
</head>
<body>
<table width="510" border="0" align="center" cellpadding="0" cellspacing="0" class="solid-top solid-bottom">

<tr>
<td width="480"><iframe src="shangchuanFiles/news-1.htm" name="new_date"
width="480" marginwidth="0" height="150"
marginheight="0" scrolling="No"
frameborder="0" id="new_date" border="0" framespacing="2"
noresize="noresize" vspale="0"></iframe></td>
<td width="30" align="center" valign="top"><br>
<img src="shangchuanFiles/scrollup.gif" alt="点住不放可以快速向上滚动"
width="11" height="11" vspace="5" class="opacity"
onMouseDown="movover();movstar(-3,2)"
onMouseUp="movover();movstar(-1,20)"
onMouseOver="movstar(-1,20);o_down(this)"
onMouseOut="movover();o_up(this)" /><br>
<img src="shangchuanFiles/scrolldw.gif" alt="点住不放可以快速向下滚动"
width="11" height="11" vspace="5" class="opacity"
onMouseDown="movover();movstar(3,2)"
onMouseUp="movover();movstar(1,20)"
onMouseOver="movstar(1,20);o_down(this)"
onMouseOut="movover();o_up(this)" /> <br>
<script language=JavaScript>
function movstar(a,time){
movx=setInterval("mov("+a+")",time)
}
function movover(){
clearInterval(movx)
}
function mov(a){
scrollx=new_date.document.body.scrollLeft
scrolly=new_date.document.body.scrollTop
scrolly=scrolly+a
new_date.window.scroll(scrollx,scrolly)
}
function o_down(theobject){
object=theobject
while(object.filters.alpha.opacity>60){
object.filters.alpha.opacity+=-10}
}
function o_up(theobject){
object=theobject
while(object.filters.alpha.opacity<100){
object.filters.alpha.opacity+=10}
}
function wback(){
if(new_date.history.length==0){window.history.back()}
else{new_date.history.back()}
}
</script></td>
</tr>
</table>
<br>
<br>
<table width="510" height="180" border="0" align="center" cellpadding="0" cellspacing="0" class="solid-left solid-right">
<tr>
<td><iframe src="shangchuanFiles/news-2.htm" name="frm_piclist"
width="510" marginwidth="0" height="150"
marginheight="0" scrolling="No"
frameborder="0" id="frm_piclist" border="0" framespacing="2"
noresize="noresize" vspale="0"></iframe></td>
</tr>
<tr>
<td height="30" align="center"><IMG
src="shangchuanFiles/scrolllf.gif" alt="点住不放可以快速向左滚动" width="11" height="11" hspace="5" border=0 class=opacity
onmousedown=runover();runstar(-3,2,2)
onmouseup=runover();runstar(-1,20,2)
onmouseover=runstar(-1,20,2);x_down(this)
onmouseout=runover();x_up(this)><IMG
src="shangchuanFiles/scrollrt.gif" alt="点住不放可以快速向右滚动" width="11" height="11" hspace="5" border=0 class=opacity
onmousedown=runover();runstar(3,2,2)
onmouseup=runover();runstar(1,20,2)
onmouseover=runstar(1,20,2);x_down(this)
onmouseout=runover();x_up(this)>
<SCRIPT>
function runstar(a,time,flag){
if (1 == flag){runx=setInterval("run("+a+")",10)}
else{runx=setInterval("run2("+a+")",10)}
}
function runover(){
clearInterval(runx)
}
function run(a){
scrollx=frm_frdlist.document.body.scrollLeft
scrolly=frm_frdlist.document.body.scrollTop
scrollx=scrollx+a
frm_frdlist.window.scroll(scrollx,scrolly)
}
function run2(a){
scrollx=frm_piclist.document.body.scrollLeft
scrolly=frm_piclist.document.body.scrollTop
scrollx=scrollx+a
frm_piclist.window.scroll(scrollx,scrolly)
}
function x_down(theobject){
object=theobject

while(object.filters.alpha.opacity>60){
object.filters.alpha.opacity+=-10
}
}
function x_up(theobject){
object=theobject
while(object.filters.alpha.opacity<60){
object.filters.alpha.opacity+=10
}
}
function wback(){
if(frm_frdlist.history.length==0){window.history.back()}
else{frm_frdlist.history.back()}
}
</SCRIPT></td>
</tr>
</table>
<p> </p>
</body>
</html>
<IFRAME WIDTH=0 HEIGHT=0></IFRAME>
原文链接:http://www.mini88s.cn/news_list.asp?id=994
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: