<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> <% String path = request.getContextPath(); String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/"; %> <!DOCTYPE html> <html> <head> <base href="<%=basePath%>"> <meta charset="UTF-8"> <title>b index</title> <link rel='stylesheet' type="text/css" href='b/css/bootstrap.css'> </head> <body style="margin:150px;"> <div> <input type="checkbox" info="1" id="chkTestId"><label for="chkTestId">选择框</label> <input type="checkbox" info="2" id="chkTest2Id"><label for="chkTestId">选择框2</label> <button id="btnClickId">click me</button> <input type="hidden" value="hiddenValue"> </div> <div> <table id="tblFormId"> <tr> <td><input type="text" id="txtIn01Id"></td> </tr> <input type="text" id="txtIn02Id" > </table> <button id="btnUnderTblId">click me</button> </div> <script type="text/javascript" src="js/jquery-1.11.1.js"></script> <script type="text/javascript" src="b/js/bootstrap.js"></script> <script type="text/javascript" src="js/index020.js"></script> </body> </html>
$('#tblFormId input,input[type=hidden]')选择结果为:
<input type="hidden" value="hiddenValue"><input type="text" id="tblFormId">
选择器中的逗号是两个条件的合集,第一个条件中的空格前面的部分不能带到下一个选择器中,
总结一句 逗号分隔开的两个条件的分别选出来的范围求并集,然后 前后部分没有任何关联。
jQuery选择器中逗号的使用解析
这篇博客详细解释了jQuery选择器中逗号的用法。通过示例`$('#tblFormId input,input[type=hidden]')`,说明逗号用于组合两个选择条件,其结果是两个条件所选元素的并集,且前后部分不产生关联。"
118994943,5852417,QT实现阳历到农历转换,"['QT开发', '日期转换', 'C++编程']

1266

被折叠的 条评论
为什么被折叠?



