jquery selectors, when separated by commas, need to be aware of the scope issues:
<%@ Page Language="Java"Import="java.util.*"pageencoding="UTF-8"%><% StringPath=Request.getcontextpath (); StringBasePath=Request.getscheme ()+ "://" +Request.getservername ()+ ":" +Request.getserverport ()+Path+ "/";%><!DOCTYPE HTML><HTML><Head><Basehref= "<%=basePath%>"><MetaCharSet= "UTF-8"><title>B Index</title><Linkrel= ' stylesheet 'type= "Text/css"href= ' B/css/bootstrap.css '></Head><Bodystyle= "margin:150px;"> <Div> <inputtype= "checkbox"Info= "1"ID= "Chktestid"><label for= "Chktestid">Selection box</label> <inputtype= "checkbox"Info= "2"ID= "Chktest2id"><label for= "Chktestid">Select box 2</label> <ButtonID= "Btnclickid">Click Me</Button> <inputtype= "hidden"value= "Hiddenvalue"> </Div> <Div> <TableID= "Tblformid"> <TR> <TD><inputtype= "text"ID= "Txtin01id"></TD> </TR> <inputtype= "text"ID= "Txtin02id" > </Table> <ButtonID= "Btnundertblid">Click Me</Button> </Div> <Scripttype= "Text/javascript"src= "Js/jquery-1.11.1.js"></Script> <Scripttype= "Text/javascript"src= "B/js/bootstrap.js"></Script> <Scripttype= "Text/javascript"src= "Js/index020.js"></Script> </Body></HTML>
$ (' #tblFormId Input,input[type=hidden] ') Select the result:
<input type= "hidden" value= "Hiddenvalue" ><input type= "text" id= "Txtin01id" >
The comma in the selector is a collection of two conditions, and the part preceding the space in the first condition cannot be taken to the next selector.
So the original meaning is: $ (' #tblFormId input, #tblFormId Input[type=hidden] ')
jquery selectors, when separated by commas, need to be aware of the scope issues