jQuery Selector Test
by karthick Chandran
HTML
<form action="." method="get">
<p>foo1: <input id="foo11" type="text" name="foo1" value="foo1"></p>
<p>foo2: <input id="foo2" type="text" name="foo2" value="foo2" readonly></p>
<p>foo3: <input id="foo3" type="text" name="foo3" value="foo3" readonly></p>
<p><input type="submit" value="Submit" ></p>
</form>
JavaScript
console.log($("#foo23"));
$("body").append('<p>$("input[readonly]:first").size(): '+$("input[readonly]:first").size()+'</'+'p>');
$("body").append('<p>$("input[readonly]:first").attr("id"): '+$("input[readonly]:first").attr("id")+'</'+'p>');
$("body").append('<p>$("input:first").size(): '+$("input:first").size()+'</'+'p>');
$("body").append('<p>$("input:first").attr("id"): '+$("input:first").attr("id")+'</'+'p>');
$("body").append('<p>$("input[readonly]").size(): '+$("input[readonly]").size()+'</'+'p>');