<input id="btnok" type="button" value="button" /> <input id="Button1" type="button" value="button" /> <div id="div1" /> <div id="div2" /> <script type="text/javascript"> document.getElementById("btnok").value; //It works on only that element which match the id with "btnok" or you can say works on unique Id. document.getElementsByTagName("div").length; //It works on all that element which have the tag name "div" </script>
// where you enter id of element after hashTag $('#IdOfControl') // or you can select anything with a certain class : $('.class1')
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)