php regex : get src value

后端 未结 5 1192
陌清茗
陌清茗 2020-12-20 04:12

How do I retrieve all src value using regex in php?



        
5条回答
  •  忘掉有多难
    2020-12-20 04:29

    jQuery Method

    var Scripts = [];
    $('head script').each(function(){
        if($(this).attr('type') == 'text/javascript' && $(this).attr('src')){
            Scripts.push($(this).attr('src'));
        }
    });
    console.log(Scripts)
    

提交回复
热议问题