最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

js 單擊式的下拉菜單效果實(shí)例

 更新時(shí)間:2013年08月13日 15:24:29   作者:  
這篇文章介紹了js 單擊式的下拉菜單效果實(shí)例,有需要的朋友可以參考一下

復(fù)制代碼 代碼如下:

<!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>
<meta http-equiv="Content-Type" content="text/html;charset=gb2312" />
<title>js 單擊式的下拉菜單效果</title>
<style>
.div1 { width: 120px; height: 20px; line-height:20px; text-align:center; }
.div2 {width: 120px; position:absolute; left:0; top:10px;visibility:hidden; }
.div2 a{ display:block;}
</style>
</head>
<body>
<script language="JavaScript">
var zindex=100
function dropit2(whichone){
if (window.themenu&&themenu.id!=whichone.id)
themenu.style.visibility="hidden"
themenu=whichone
if (document.all){
themenu.style.left=document.body.scrollLeft+event.clientX-event.offsetX
themenu.style.top=document.body.scrollTop+event.clientY-event.offsetY+18
if (themenu.style.visibility=="hidden"){
themenu.style.visibility="visible"
themenu.style.zIndex=zindex++}
else{
hidemenu()}}}
function dropit(e,whichone){
if (window.themenu&&themenu.id!=eval(whichone).id)
themenu.visibility="hide"
themenu=eval(whichone)
if (themenu.visibility=="hide")
themenu.visibility="show"
else
themenu.visibility="hide"
themenu.zIndex++
themenu.left=e.pageX-e.layerX
themenu.top=e.pageY-e.layerY+19
return false}
function hidemenu(whichone){
if (window.themenu)
themenu.style.visibility="hidden"}
function hidemenu2(){
themenu.visibility="hide"}
if (document.all)
document.onclick=hidemenu
</script>
<span class="div1" onClick="dropit2(dropmenu);event.cancelBubble=true;return false"> <a href="###" onClick="if(document.layers) return dropit(event, 'document.dropmenu')">[點(diǎn)擊顯示菜單]</a> </span>
<div class="div2" id="dropmenu">
<a href="http://m.fzitv.net">腳本之家</a>

<a href="#">個(gè)性名字網(wǎng)</a>
<a href="#">個(gè)性名字網(wǎng)</a>
</div>
</body>
</html> </td>
   </tr>
 </table>

相關(guān)文章

  • js點(diǎn)擊出現(xiàn)懸浮窗效果不使用JQuery插件

    js點(diǎn)擊出現(xiàn)懸浮窗效果不使用JQuery插件

    JQuery有很多這樣的插件,但本文的這個(gè)是跟著自己的想法寫的,也不知道他人是如何實(shí)現(xiàn)的,感興趣的朋友可以了解下
    2014-01-01
  • js實(shí)現(xiàn)網(wǎng)頁圖片輪換播放

    js實(shí)現(xiàn)網(wǎng)頁圖片輪換播放

    這篇文章主要為大家詳細(xì)介紹了js實(shí)現(xiàn)網(wǎng)頁圖片輪換播放,文中示例代碼介紹的非常詳細(xì),具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下
    2021-09-09
  • 微信小程序連續(xù)簽到7天積分獲得功能的示例代碼

    微信小程序連續(xù)簽到7天積分獲得功能的示例代碼

    今天通過一個(gè)案例給大家分享微信小程序連續(xù)簽到7天積分獲得功能,通過實(shí)例代碼給大家介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或工作具有一定的參考價(jià)值,感興趣的朋友一起學(xué)習(xí)吧
    2020-08-08
  • JavaScript實(shí)現(xiàn)的購物車效果可以運(yùn)用在好多地方

    JavaScript實(shí)現(xiàn)的購物車效果可以運(yùn)用在好多地方

    JavaScript實(shí)現(xiàn)的購物車效果,當(dāng)然這個(gè)效果可以運(yùn)用在好多地方,比如好友的選擇,人力資源模塊等等,需要的朋友可以參考下
    2014-05-05
  • 最新評(píng)論

    平顶山市| 双城市| 康马县| 林甸县| 开化县| 泰兴市| 西贡区| 张家口市| 古浪县| 开阳县| 太湖县| 方城县| 佛山市| 乐都县| 廊坊市| 敖汉旗| 邢台市| 兴化市| 济南市| 泌阳县| 东台市| 桦甸市| 五常市| 靖边县| 化州市| 高淳县| 芦山县| 泰兴市| 类乌齐县| 常德市| 太仆寺旗| 三河市| 上饶县| 繁峙县| 阜康市| 宁安市| 威远县| 镇巴县| 平山县| 海门市| 营口市|