I am new to web programming and I am starting off with a simple game where you try to guess a number between 1-50. What you do is you put your guess into a textbox and then lock in your answer so you cant change it. Then, you click on "Random Number". It will give you your number and it will tell you if you won or not. I have the part of the random number generator, but I am trying to find out the lock section.

What I have so far:

```
<input type="text" name="answerbox" size="40">
                <div id="lockbtn">
                    <button onclick="btnFunction()">LockIn</button>

                    <script>
                    function btnFunction {
                        document.getElementById("answerbox").readOnly = true;
                    }
                    </script>

```