Why this is not working

    <form name = "form1"> 
        Enter Number : <input type = "number" id = "N">
        <input type = "button" onclick = print() value = "print">
    </form>
  

</body>


<script>
    function print(){
    var q = document.form1.getElementById("N").value;
        alert(q*q*q);

    }
</script>