代碼: 選擇全部
$( "a" ).each(function( index ) {
//console.log( index + ": " + $(this).text() );
if($(this).text().indexOf("someword") !=-1){
console.log( $(this).attr('href') );
}
});
代碼: 選擇全部
$( "a" ).each(function( index ) {
//console.log( index + ": " + $(this).text() );
if($(this).text().indexOf("someword") !=-1){
console.log( $(this).attr('href') );
}
});