• <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判斷搜索關(guān)鍵詞是否為空及搜索請求跳轉(zhuǎn)的實現(xiàn)代碼片段

      Jquery判斷搜索關(guān)鍵詞是否為空及搜索請求跳轉(zhuǎn)的實現(xiàn)代碼片段

      時間:2018-03-27來源:風(fēng)信官網(wǎng) 點擊: 749次
      Jquery判斷搜索關(guān)鍵詞是否為空及搜索請求跳轉(zhuǎn)的實現(xiàn)代碼片段,以下代碼為項目開發(fā)中的片段,實現(xiàn)方法思路僅供參考。


      //搜索
          $('#submit-search').on('click', function () {
              var $keyWorld = $(".header-search .txt").val();
              $keyWorld = $.trim($keyWorld);
              var identify = $('#search-identify').val();
              if ($keyWorld.length <= 0) {
                  alert('請輸入搜索關(guān)鍵詞 ...');
                  return false;
              }
              window.location.href = '//ithov.com/search/video?keyWorld=' + $keyWorld + '&identify=' + identify;
          });

          $(".header-search .txt").keydown(function (event) {
              if (event.keyCode === 13) { //綁定回車
                  $('#submit-search').click();
              }
          });
      欄目列表
      推薦內(nèi)容
      熱點內(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>