• <b id="l3qpx"><abbr id="l3qpx"></abbr></b>
  • <th id="l3qpx"><progress id="l3qpx"></progress></th>
      <th id="l3qpx"></th>
      <dd id="l3qpx"><font id="l3qpx"></font></dd>
      <th id="l3qpx"></th>
      0712-2888027 189-8648-0214
      微信公眾號

      孝感風(fēng)信網(wǎng)絡(luò)科技有限公司微信公眾號

      當(dāng)前位置:主頁 > 技術(shù)支持 > Javascript/JQuery > jquery禁用a標(biāo)簽,jquery禁用按鈕click點(diǎn)擊

      jquery禁用a標(biāo)簽,jquery禁用按鈕click點(diǎn)擊

      時(shí)間:2016-03-31來源:風(fēng)信官網(wǎng) 點(diǎn)擊: 966次
      jquery禁用a標(biāo)簽方法1

      $(document).ready(function () {

              $("a").each(function () {

                  var textValue = $(this).html();

                  if (textValue == "XX概況" || textValue == "服務(wù)導(dǎo)航") {

                      $(this).css("cursor", "default");

                      $(this).attr('href', '#');     //修改<a>的 href屬性值為 #  這樣狀態(tài)欄不會(huì)顯示鏈接地址

                      $(this).click(function (event) {

                          event.preventDefault();   // 如果<a>定義了 target="_blank“ 需要這句來阻止打開新頁面

                      });

                  }

              });

      });

      jquery禁用a標(biāo)簽方法2

      $('a.tooltip').live('click', function(event) {

         alert("抱歉,已停用!");

        event.preventDefault();  

      });


      jquery禁用a標(biāo)簽方法3

      $(function(){

      $('.disableCss').removeAttr('href');//去掉a標(biāo)簽中的href屬性

      $('.disableCss').removeAttr('onclick');//去掉a標(biāo)簽中的onclick事件

      });

      jquery控制按鈕的禁用與啟用

      控制按鈕為禁用:
      $('#button').attr('disabled',"true");添加disabled屬性
      $('#button').removeAttr("disabled"); 移除disabled屬性
      欄目列表
      推薦內(nèi)容
      熱點(diǎn)內(nèi)容
      展開
      欧美一区二区三区免费A级视频,亚洲精品中文字幕综合,动漫精品中文字幕无码第一页,1024亚洲国产综合 亚太影院 柯西贝尔-游戏赚网
    1. <b id="l3qpx"><abbr id="l3qpx"></abbr></b>
    2. <th id="l3qpx"><progress id="l3qpx"></progress></th>
        <th id="l3qpx"></th>
        <dd id="l3qpx"><font id="l3qpx"></font></dd>
        <th id="l3qpx"></th>