亚洲乱码中文字幕综合,中国熟女仑乱hd,亚洲精品乱拍国产一区二区三区,一本大道卡一卡二卡三乱码全集资源,又粗又黄又硬又爽的免费视频

jQuery實現(xiàn)當(dāng)前頁面標(biāo)簽高亮顯示的方法

 更新時間:2015年03月10日 15:12:19   作者:MeGoodtoo  
這篇文章主要介紹了jQuery實現(xiàn)當(dāng)前頁面標(biāo)簽高亮顯示的方法,涉及jQuery通過自定義函數(shù)操作css樣式的技巧,非常具有實用價值,需要的朋友可以參考下

本文實例講述了jQuery實現(xiàn)當(dāng)前頁面標(biāo)簽高亮顯示的方法。分享給大家供大家參考。具體實現(xiàn)方法如下:

function nav(name, csskey,cssvalue) {
  var url = window.location.pathname + window.location.search;
  var v1 = "";
  $(name).each(function () {
    v1 = "/" + $(this).attr("href");
    if (v1 == url) {
      var v2 = $(this).css(csskey, cssvalue);
    }
  })
}

用法如下:

<script src="Scripts/commo.js" type="text/javascript"></script>
<script type="text/javascript">
 window.onload = function () {
   nav(".top ul li a", "background-color", "rgb(255,89,0)");
 }
</script>

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

相關(guān)文章

最新評論