Skip to content

Instantly share code, notes, and snippets.

@mingtsay
Last active October 19, 2017 03:22
Show Gist options
  • Save mingtsay/13f1f8a80d3413dfe3beefc0aad1cf80 to your computer and use it in GitHub Desktop.
Save mingtsay/13f1f8a80d3413dfe3beefc0aad1cf80 to your computer and use it in GitHub Desktop.
for MCU Attending form select all for personal leave
(function(d){
var f = d.getElementsByTagName("select");
for (var i in f) {
if (f[i] && !f[i].disabled) {
f[i].selectedIndex = 0;
}
}
}(document));
/*
Usage: put the following link into your bookmark
javascript:(function(d){var%20f=d.getElementsByTagName("select");for(var%20i%20in%20f){if(f[i]&&!f[i].disabled){f[i].selectedIndex=0;}}}(document));
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment