日期:2014-05-16  浏览次数:20361 次

图片上左右箭头翻页js代码

?

<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" />

?附件为:zuo'you

?