javascript input field
snippet in html

how to do input in html

user9507

<input type="radio">Hi</input>

add an input DOM

user9639

<!DOCTYPE html> 
<html> 
  
<head> 
    <title> 
        HTML DOM Input Text Object 
    </title> 
</head>    
  
<body>  
  
    <h1>GeeksForGeeks</h1>  
  
    <h2>DOM Input Text Object</h2> 
  
    <input type="text" id="text_id" value="Hello Geeks!"> 
      
    <p>Click on button to display the text field</p> 
      
    <button onclick="myGeeks()">Click Here!</button> 
      
    <p id="GFG"></p> 
      
    <!-- script to access text field -->
    <script> 
        function myGeeks() { 
            var txt = document.getElementById("text_id").value; 
            document.getElementById("GFG").innerHTML = txt; 
        } 
    </script> 
</body> 
  
</html>                     

javascript input field

user7868

<!DOCTYPE html> 
<html> 
  <body>
    <input> Here is your inputfield </input>
  </body>
</html>