We would like to know how to select input element inside form.
<html>
<head>
<script type="text/javascript" src='http://code.jquery.com/jquery-1.5.2.js'></script>
<script type="text/javascript">
$(document).ready(function(){<!-- w ww . j a v a 2 s .co m-->
$("form input").css("border", "2px solid red");
});
</script>
</head>
<body>
<form>
<label>Child:</label>
<input name="name" />
<fieldset>
<label>Grandchild:</label>
<input name="newsletter" />
</fieldset>
</form>
</body>
</html>
The code above is rendered as follows: