<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js">
</script>
<a href="http://www.google.com" id="aGoogle1">Google Link</a>
<script type="text/javascript">
$(function()
{
console.log($('a[href="http://www.google.com"]'));
});
</script>
In chrome->console, I can see $('a[href="http://www.google.com"]')
returns the selected element, and I can see it has this property: id: "aGoogle1". so my question is:
How to output the property, e.g. id, I tried $('a[href="http://www.google.com"]'.id)
, but it does not work?