get the state of a checkbox

JavaScript
function checkAddress()
{
    var chkBox = document.getElementById('checkAddress');
    if (chkBox.checked)
    {
        // ..
    }
}
Source

Also in JavaScript: