網(LieHuo.Net)教程 幫一朋友臨時寫的《javascript實現可以拖動的層示例(層拖動,兼容IE/FF) 》,感覺還算簡潔,效果也還不錯,記下來,避免下次再造輪子。
<!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><title>Javascript實現可以拖動的層示例 - 網(LIEHUO.NET)</title><style type="text/css">#main div{position:absolute;width:220px;height:150px;border:1px solid #999;}</style></head><body><center>網(LIEHUO.NET)提示,用鼠標拖動下面的層試試看!</center><div id="main"><div style="left:100px;top:100px;background:#fc9;" onmousedown="$(this,event)">1</div><div style="left:400px;top:100px;background:#9cf;" onmousedown="$(this,event)">2</div><div style="left:700px;top:100px;background:#f9c;" onmousedown="$(this,event)">3</div><div style="left:100px;top:300px;background:#9fc;" onmousedown="$(this,event)">4</div><div style="left:400px;top:300px;background:#c9f;" onmousedown="$(this,event)">5</div><div style="left:700px;top:300px;background:#cf9;" onmousedown="$(this,event)">6</div></div></body></html>提示:可修改后代碼再運行!
本文原創發表于博客園,作者:丁學,原文地址:http://www.cnblogs.com/dingxue/archive/2009/09/14/1566091.html
上一篇 淺淡SQL Server的Top與Oracle的RowNum
下一篇 ROUTE命令配置路由策略使雙網卡可以同時訪問內網和外網
程序員人生,我編程,我富裕,記住wfuyu網,php教程,php學習,php手冊,CMS模版制作
聲明:本站大部分內容是作者原創,少部分收集于互聯網供大家一起學習,原版權很多不明,如有侵權請聯系本站,謝謝!
粵ICP備14040726號-1?? 2015-2020 程序員人生 版權所有