国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 編程 > JavaScript > 正文

JS實(shí)現(xiàn)動態(tài)移動層及拖動浮層關(guān)閉的方法

2019-11-20 12:34:49
字體:
供稿:網(wǎng)友

本文實(shí)例講述了JS實(shí)現(xiàn)動態(tài)移動層及拖動浮層關(guān)閉的方法。分享給大家供大家參考。具體實(shí)現(xiàn)方法如下:

<html><head><title>動態(tài)移動的層</title><body bgcolor="#ADBAC9"><div id="div1" class="yellow" style="VISIBILITY:visible ; background-color:#FFFF00; position: absolute; top: 60; left: 200;width: 360; height: 250;filter: revealTrans(transition=12, 'duration=0.1) blendTrans(duration=0.1) "><div id=title onmousedown=DIVDown("div1") style="background-color:#30608F;padding:2px; font-size:13px;text-indent:5;color:#FFFFFF;cursor:move">標(biāo)題</div><img id=close onclick=Hide(div1)style="position: absolute; right: 2; top: 2" border="0"src="close.gif" width="15" height="15"></div><script language="JavaScript">var Obj="none";var pXvar pYdocument.onmousemove=DIVMove;document.onmouseup=DIVUp;function DIVDown(tag){Obj=tag;pX=parseInt(document.all(Obj).style.left)-event.x;pY=parseInt(document.all(Obj).style.top)-event.y;}function DIVMove(){if(Obj!="none"){document.all(Obj).style.left=pX+event.x;document.all(Obj).style.top=pY+event.y;event.returnValue=false;}}function DIVUp(){Obj="none";}function Hide(divid){divid.filters.revealTrans.apply();divid.style.visibility = "hidden";divid.filters.revealTrans.play();}</script></body></html>

希望本文所述對大家的javascript程序設(shè)計有所幫助。

發(fā)表評論 共有條評論
用戶名: 密碼:
驗(yàn)證碼: 匿名發(fā)表
主站蜘蛛池模板: 通辽市| 精河县| 来安县| 新泰市| 英德市| 上栗县| 桃园县| 广汉市| 安泽县| 多伦县| 富阳市| 松阳县| 德州市| 宁乡县| 全州县| 赤水市| 杂多县| 海晏县| 蒙山县| 闵行区| 纳雍县| 乾安县| 新田县| 武清区| 隆昌县| 延吉市| 雷州市| 汉中市| 乌拉特前旗| 大田县| 莱西市| 三门县| 大同县| 长岭县| 景洪市| 象山县| 桂平市| 潜江市| 台江县| 鲜城| 栖霞市|