Issues trying to get an element by id
I didn’t get main part of your question. Still let me try: document.getElementById(‘InOrCm’).value = “in”; That mean you are adding value to the input with id “InOrCm”. If I am getting you then your syntax is right. Double check your ‘id’ name. check with console output. document.getElementById(‘InOrCm’).value = “in”; console.log(document.getElementById(‘InOrCm’).value); Here is second part: function … Read more