JavaScript网页特效实例大全

源代码在线查看: 7-13.htm

软件大小: 1723 K
上传用户: wql507
关键词: JavaScript
下载地址: 免注册下载 普通下载 VIP

相关代码

				
				.drag{position:relative;cursor:hand}
				
				
				var dragapproved=false
				var z,x,y
				
				function move(){
				
				if (event.button==1&&dragapproved){
				z.style.pixelLeft=temp1+event.clientX-x
				z.style.pixelTop=temp2+event.clientY-y
				return false}}
				
				function drags(){
				if (!document.all)
				return
				if (event.srcElement.className=="drag"){
				dragapproved=true
				z=event.srcElement
				temp1=z.style.pixelLeft
				temp2=z.style.pixelTop
				x=event.clientX
				y=event.clientY
				document.onmousemove=move
				}}
				
				document.onmousedown=drags
				document.onmouseup=new Function("dragapproved=false")
				
				欢迎来到JavaScript世界!
				
				
				
				
				
							

相关资源