By I'd document. getElementById()
html pdf interview questin
i think answer is "var x = document.getElementById("mySelect");"
document.getElementByTagName('Tag') e.g. document.getElementByTagName('div');
if you want to select any html tag using javascript the below function is used document.getelementsbytagname("HtmlTag"); if you want to set any attribute for any html tag using javascript the below function is used document.getElementsByTagName("HtmlTag")[0].setAttribute("Property", "Value");
I am not getting the question. did you mean to say "Select html tag based on attribute using Javascript"??