set text in jquery

0 votes

If I want to set the text of a <div id="error"></div> to "Test message here", do I do:

 $('<div id="error">').text('Test message here');

I tried this and it's not working. Thoughts?

Aug 8, 2022 in Web Development by gaurav
• 23,260 points

edited 5 days ago 6 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP