javascript對連結進行動態處理化

來源:互聯網
上載者:User

標籤:remove   for   智能   隱藏   this   rem   更新   品牌   var   

//  $(function(){
// var aLink=$(‘.nav-content .nav li a‘); // 選中所有a
// var aText=[‘線上搭配‘,‘星網學院‘,‘推客聯盟‘,‘網紅專區‘,‘源頭好貨‘,‘新品訂貨‘,‘庫存特賣‘,‘加盟代理‘,‘國際知名品牌‘,‘國際品牌師‘,‘每日9點半更新‘,‘網紅專賣‘,‘網紅達人‘,‘國際知名設計師‘,‘智能成衣‘]; //匹配文本
//
// aLink.each(function(){ //對所有的a進行迴圈
//
// var text = $(this).text(),// 擷取當前a裡面的文本
// that = $(this);// 預留當前this指的對象
//
// aText.forEach(function(item,index){ //數組進行遍曆
// if( text.indexOf(item) != -1 ){
//
// that.remove();//將滿足條件的a 進行隱藏
// }
// });
// })
// })

javascript對連結進行動態處理化

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.