[Solved] x = document.getElementById(“numb”).value; [closed]


.value means that you get the value assigned to a HTML element. For example:

<html>
    <head>
        <script>
            function getName()
                {
                    var x = document.getElementById("numb").value;
                    msgbox(x);
                }
        </script>
    </head>
    <body>
        <input type="button" value="Get Name" onclick='getName()'/>
        <input id='numb' type="text" name="myname" value="5"/>
    </body>
</html>

1

solved x = document.getElementById(“numb”).value; [closed]