// 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