SyntaxFix
Write A Post
Hire A Developer
Questions
Why not add a variable for the element's Id and make it a reusable function?
function SelectElement(selectElementId, valueToSelect) { var element = document.getElementById(selectElementId); element.value = valueToSelect; }