1 <%@ Page Language="Java"Import="java.util.*"pageencoding="UTF-8"%>2 <%3 StringPath=Request.getcontextpath ();4 StringBasePath=Request.getscheme ()+ "://"5 +Request.getservername ()+ ":" +Request.getserverport ()6 +Path+ "/";7 %>8 9 <!DOCTYPE HTML PUBLIC "-//w3c//dtd HTML 4.01 transitional//en">Ten <HTML> One <Head> A <Basehref= "<%=basePath%>"> - - <title>My JSP ' jquery.jsp ' starting page</title> the - <Metahttp-equiv= "Pragma"content= "No-cache"> - <Metahttp-equiv= "Cache-control"content= "No-cache"> - <Metahttp-equiv= "Expires"content= "0"> + <Metahttp-equiv= "keywords"content= "Keyword1,keyword2,keyword3"> - <Metahttp-equiv= "description"content= "This is my page"> + <Scripttype= "Text/javascript"src= "/common/easyui/jquery.min.js"></Script> A <Scripttype= "Text/javascript"> at $ (document). Ready (function(){ - $("Tr:hidden"). CSS ("Display","Block"); - }); - </Script> - </Head> - <Body> in <Table> - <TRstyle= "Display:none"><TD>Value 1</TD></TR> to <TR><TD>Value 2</TD></TR> + </Table> - </Body> the </HTML>
30 <tr style= "Display:none" >< td>value 1</< Span style= "color: #800000;" >td></tr>
This line code hides TR
$ ("tr:hidden"). CSS ("display","block");
This line of code selects all elements of TR as hidden, specifying the display as block
Key explanations:
: Hidden
Matches all invisible elements, and the INPUT element's type attribute is "hidden", which is also matched to
$ ("Tr:hidden")
To find the TR element of type hidden
Similar knowledge points:
: Visible
Match all visible elements
$ ("tr:visible")
Find the TR element with the type visible
jquery Learning (Selector-visibility-hidden)