Answers for "how to display input name and value in javascript form_data"

7

javascript get form data

<html>
    <form id="myForm">
        <input type="text" name="email" value="[email protected]">
    </form>
    <p id='text'></p>

    <script>
        window.setInterval(()=>{
            var myForm = document.getElementById('myForm');
            var text = document.getElementById('text');

            text.innerText = myForm.elements['email'].value;
        }, 1);
    </script>
</html>
Posted by: Guest on June-07-2020

Code answers related to "how to display input name and value in javascript form_data"

Code answers related to "Javascript"

Browse Popular Code Answers by Language