Jquery and js can respectively hide and display divs in different ways. jquery's show and show; this document describes how to hide and display p in jquery and js.
Jquery and js can respectively hide and display p in different ways. jquery's show and show; js's hidden and visible
JQuery shows and hides p:
Display:
The Code is as follows:
$ ("# Id"). show ()
Hide:
The Code is as follows:
$ ("# Id"). show ()
Js to show and hide p:
The visibility of p can control the display and hiding of p, but the page is blank after it is hidden.
The Code is as follows:
Style = "visibility: none;" document. getElementById ("typep1 "). style. visibility = "hidden"; // hide document. getElementById ("typep1 "). style. visibility = "visible"; // display
You can hide p by setting the display attribute to release the occupied page space, as shown below:
The Code is as follows:
Style = "display: none;" document. getElementById ("typep1 "). style. display = "none"; // hide document. getElementById ("typep1 "). style. display = ""; // display
The above section details how jquery and js can hide and display Divs. For more information, see other related articles in the first PHP community!