Let say, I have code as follow
<div id='tes' data-name='baloon'>Content Baloon</div>
<div id='tes' data-name='big'>Content Big</div>
And I want to get inner of each div with javascript (not jquery) but work on html5. How to that?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can’t have elements with the same ID in an HTML (5 or any other version) document – it is an error. Therefore, there is no way javascript can address this.
Check the HTML spect at http://www.w3.org/TR/html401/struct/global.html#h-7.5.2
You can have multiple elements with the same “name” property – and javascript offers support for that.