I have a span tag without an id
eg: <span>Welcome</span>
I have many span tags in the same web page.
Is there a way to access this span tag in the javascript and change the
“Welcome” to “something else”
Thanks
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.
If there’s no ID or other attribute you can select, then you can loop through all
<span>elements looking for the exact text (via.innerHTMLfor example), like this:You can test it out here.