Issue
I have one web application in asp.net with angularjs.
I want to get all anchor tags having data-ng-click.
Is this possible?If yes then how?
i tried using
var x = document.querySelectorAll("a");
but it is giving list of all anchor tags
i want only those anchor tags which have data-ng-click.
I am trying to get this list in google console.
If its working ,then i will add it in google extension .
Solution
To get the elements with a specific attribute use this:
document.querySelectorAll("a[data-ng-click]");
or with angularjs:
angular.element("a[data-ng-click]")
Answered By - Bill P
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.