jQuery HTMLLesson 14Free preview
jQuery Get
This lesson is part of jQuery · All levels
Summary
The Get method group is used to read the content or attributes of a selected element. Text() is available for plain text, html() for markup in it, val() for input values, as well as attr() for attribute reading. All these methods are called without argument to get the current value.
Key points
- Text() take the text content without HTML tag
- Html() takes the content and markup HTML within it
- Val() takes the value of an element of a form
- Attr() read attribute values such as href or src
- Calling without an argument means reading mode
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.