How to insert additional text using jquery or javascript
I want to know is it possible to insert additional text in HTML elements using jquery or javascript?
If there is already a text "Down" in paragraph elements, then I just want to append text "full", so that it woul开发者_StackOverflow中文版d be "Down full". Is this possible? Which method should I use?
With jQuery, have a look at .append()
:
Insert content, specified by the parameter, to the end of each element in the set of matched elements.
E.g.:
$('p').append(' full');
精彩评论