我想在jquery或javascript中通过元素的href属性来获取元素。这有可能吗?
发布于 2010-06-24 06:23:53
var myElement = $("a[href='http://www.stackoverflow.com']");
http://api.jquery.com/attribute-equals-selector/
发布于 2010-06-24 06:23:34
是。
$('a[href=\'http://google.com\']')
https://stackoverflow.com/questions/3105984
相似问题