Suppose on my HTML page I have many hrefs to a link.
Using Javascript, I need to loop through all hrefs and replace them with something and I don’t have any ids to a href.
Please help.
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.
Edit (after OP’s comment)
document.anchors return anchors collection provide anchors have
nameattribute in them.These are
validanchors fordocument.anchorsBut this is not,
Better, use this instead