Published in: JavaScript
var var_name = $('#checkbox_id').attr('checked')?1:0;
You need to login to post a comment.
Pro JavaScript Techniques
Pro JavaScript Techniques is the ultimate JavaScript book for the modern web developer. It provides everything you need to know about modern JavaScript, and shows what JavaScript can do for your web sites. This book doesn't waste any time looking at things you already know, like basic syntax and structures.
penguin999 on 07/24/07
5 people have marked this snippet as a favorite
francisre
heinz1959
AgentPhoenix
yetanother
martingoldszein
Published in: JavaScript
var var_name = $('#checkbox_id').attr('checked')?1:0;
You need to login to post a comment.