开发者

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');
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜