1

I have a link <a id='id'>text1</a>.

How can I set <a id='id'>text2</a> using jQuery?

1

2 Answers 2

4
$("#id").text("text2");
Sign up to request clarification or add additional context in comments.

Comments

1

.text() method is there in jquery to set the text value.

check this : http://api.jquery.com/text/

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.