jQuer 選擇器
[ attribute?= value ]選擇器用于選擇具有包含指定屬性值的元素。
$("[attribute~=value]")
選擇每個<img>元素具有alt屬性值(包含單詞“ Parrot”):
$(document).ready(function(){ $("img[alt~=Parrot]").css("border", "5px solid red"); });