/ Published in: JavaScript
Very useful for changing the selected option in a select dropdown
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
var foo = document.getElementById('yourSelect'); if (foo) { if (foo.selectedIndex != null) { foo.selectedIndex = 0; } }
URL: www.CordSlatton.com