+ 1
How to verify html "Tags" by JavaScript for some basis.
I have two button tags in html; each have different name and i want to verify them through JavaScript. How can i do this?
2 odpowiedzi
+ 3
What are you wanting to verify about the buttons?
document.getElementsByTagName('button')
^That'll retrieve any buttons on your page.
document.getElementsByName("elementName");
^That'll retrieve the individual button based upon its name.
document.getElementById("elementID");
^That'll retrieve the individual button based upon its ID.
document.getElementsByClassName("elementClass");
^^That'll retrieve the individual button based upon its class.
Hope that helps. Give me more information if you have a more specific question about verification.
0
can you give me more tricks about JavaScript @jakob