WEB开发网:<html><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312">&l
赞助商链接
中资源
>> 最新文章
>> 赞助商
>> 热门文章
WEB开发网文章阅读

可以拖动的文本

作者:未知 文章来源:WEB开发网 更新时间:2008-1-24 15:39:55

<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>网页特效|www.cncms.com.cn/effect|---可以拖动的文本</title>
<style>
.drag{position:relative;cursor:hand}
</style>
<script language="JavaScript">
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")
</script>
</head>

<body>

<font class="drag">欢迎光临网页特效观止</font>

</body>

</html>

百度搜索中共有相关主题
[阅读:次] [返回上一页] [打 印]
  • 相关文章
  • 本类热门