You are here: irt.org | FAQ | JavaScript | Form | Q1448 [ previous next ]
Try:
<script language="JavaScript"><!-- document.myform.mySelect.selectedIndex=-1; //--></script>
or:
<form name="myform"> <select name="myselect"> <option value="">---- Select something --- <option value="1">One .... </select> </form>
and use:
<script language="JavaScript"><!-- document.myform.myselect.options[0].selected = true; //--></script>
or possibly (but I have never used it):
<script language="JavaScript"><!-- document.myform.myselect.options[document.myform.myselect.selectedIndex].selected = false; //--></script>