Get and Set Content
text, html and val read or write content. With an argument they set, without they get. Use text for user data to avoid injecting HTML.
Example
const t = $('#a').text();
$('#a').html('<b>Bold</b>');
$('#name').val('Ada');Exercise
Read an input value.
$('#name').()
Quiz Test
These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.