|
热门文章 |
|
|
|
|
图片上左右箭头翻页代码 |
来源:大众源码 更新时间:2010/9/25 21:13:42 阅读次数: 我要投稿 |
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <title>图片上左右箭头翻页代码</title> </head> <body style="text-align:center"> <script> function upNext(bigimg){ var lefturl = '01.html'; var righturl = '03.html'; var imgurl = righturl; var width = bigimg.width; var height = bigimg.height; bigimg.onmousemove=function(){ if(event.offsetX<width/2){ bigimg.style.cursor = 'url(images/arr_left.cur),auto'; imgurl = lefturl; }else{ bigimg.style.cursor = 'url(images/arr_right.cur),auto'; imgurl = righturl; } } bigimg.onmouseup=function(){ top.location=imgurl; } } </script> <img onmouseover="upNext(this)" src="images/02.jpg" /> </body> </html> |
|
上一篇文章: 网站常用的Flash图片焦点幻灯代码下一篇文章: 基于JavaScript的图片播放器Shadowbox |
|
|