Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

Get input JS

<!DOCTYPE html> 
<html> 
  
<body> 
  
  <h4> 
      Change the text of the text field  
      ,and then click the button. 
  </h4> 
  
  <label for="domTextElement">Name: </label>
  <input type="text" id="domTextElement" > 
  
  <button type="button"  onclick="getValueInput()"> 
      click me!! 
  </button> 
  
  <p id="valueInput"></p> 

  <script> 

    const getValueInput = () =>{
      let inputValue = document.getElementById("domTextElement").value; 
      document.getElementById("valueInput").innerHTML = inputValue; 
    }
    
  </script> 
</body> 
  
</html>
Comment

PREVIOUS NEXT
Code Example
Javascript :: export e import javascript 
Javascript :: find max value in javascript 
Javascript :: try...catch...throw javascript 
Javascript :: palindrome javascript 
Javascript :: string match 
Javascript :: how to detect click outside div 
Javascript :: react radio button checked not working 
Javascript :: process exit code 
Javascript :: jquery select input 
Javascript :: cordova delete cache 
Javascript :: iban validation regex for all countries 
Javascript :: javascript button click event 
Javascript :: geojson 
Javascript :: Download excel using reactJS 
Javascript :: next js custom document 
Javascript :: react semantic button 
Javascript :: for in loop js 
Javascript :: discord.js presence update 
Javascript :: array.slice 
Javascript :: javascript select function 
Javascript :: vue 3 create app 
Javascript :: react useMemo to render a list 
Javascript :: move last element of array to begining javascript 
Javascript :: js fetch 
Javascript :: tolocale string no seconds 
Javascript :: Find duplicate or repeat elements in js array 
Javascript :: clear input field data in jquery 
Javascript :: node.js check if a remote URL exists 
Javascript :: Material-ui Accessible icon 
Javascript :: cache request in vue 
ADD CONTENT
Topic
Content
Source link
Name
5+5 =