Select hidden input
Description
The following code shows how to select hidden input.
Example
<html>
<head>
<style>
.test {<!-- w w w . j a v a 2s. com-->
border: 1px solid red;
}
</style>
<script
src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(
function() {
$("span:first").text(
$(":hidden", document.body).length
+ " hidden elements.");
});
</script>
</head>
<body>
<span></span>
<div></div>
<div style="display: none;">java 2s.c om!</div>
<div></div>
<div></div>
<form>
<input type="hidden" /> <input type="hidden" /> <input type="hidden" />
</form>
<span></span>
</body>
</html>