Change background by radio selection

HTML

<form name="form" onsubmit="return check()">
    <p><input type="radio" name="bg" value="no" /> Desactivate</p>
    <p><input type="radio" name="bg" checked="checked" value="yes" /> Activate</p>
    <input type="submit" />
</form>

JavaScript

function check() {
    if (document.form.bg.value == "yes") {
        document.body.style.background = "red";
    } else {
        document.body.style.background = "";
    }
    return false;
}