[jQuery]在Firebug下使用jQuery列舉所有連結
發表於 : 2013年 9月 1日, 21:07
代碼: 選擇全部
$( "a" ).each(function( index ) {
//console.log( index + ": " + $(this).text() );
if($(this).text().indexOf("someword") !=-1){
console.log( $(this).attr('href') );
}
});