Monday, August 1, 2011

Javascript


Javascript Set Selected Index For Dropdown



There are lots of ways to set a dropdown’s selection but the easiest would be to set the dropdown’s value with a value. Provided you used an id to access the dropdown object, do this.
document.getElementById('dropdown').value = 'one';