Tutorials
http://www.w3schools.com/jquery/default.asp
1) Print all input controls in page
$(":input")
only visible controls
$(":input:visible")
to known count of visible items
$(":input:visible").size()
2) Print all input controls with value in xml tags
var str='';
$(":input:visible").each(function(){
str+='<'+this.id+'>'
str+=$(this).val();
str+=''+this.id+'>'
})
console.log(str)
2) checkbox item checked or not
$('#chkShowPassword').is(':checked') ? alert('checked'); : alert('unchecked');
Wednesday, May 4, 2011
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment