Home > Article > Web Front-end > How to assign value to p tag in jquery
How jquery assigns values to the p tag: 1. Add [$("#bq").html("content");] to the jquery code; 2. Add [9a7ac2d473bce283528a9e73637adcb094b3e26ee717c64999d7867364b1b4a316b28748ea4df4d9c2150843fecfba68].
The operating environment of this tutorial: windows10 system, jquery2.2.4, this article is applicable to all brands of computers.
How jquery assigns values to the p tag:
There are two methods introduced respectively
Add
$("#bq").html("内容");
in the jquery code Add
<div><p id="bq"></p></div>
to the html code Related free learning recommendations: JavaScript (video)
The above is the detailed content of How to assign value to p tag in jquery. For more information, please follow other related articles on the PHP Chinese website!