Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js get id value

// Get the ID from Element
let element = document.getElementById('elementId')
console.log(element.id) // Get the ID

// Get value from input Element
let element = document.getElementById('elementId')
console.log(element.value) // Get the value
 
PREVIOUS NEXT
Tagged: #js #id
ADD COMMENT
Topic
Name
4+9 =