Returning a 1 or 0 for checkbox , wheter checked or unchecked in HTML5 : I declared a var and want to pass the status of the checkbox to the dhcp_addr variable and set it to 1 when the checkbox is checked and 0 when its unchecked. Need some help in returning a value to the variable.
	

   

    var dhcp_addr = $('#dhcp').change(function(){
    		         	if(dhcp.checked){
    		         		console.log("checked");
    		         	}
    		         	else{
    		         		console.log("unchecked");
    		         	}
    		}); 
    	
    	