用js实现select下拉列表的默认值选中很方便,只要 加上一句 document.form1.country.value = "USA";即中。
示例代码如下:
<form method="post" action="" name="form1">
<SELECT id=country name=country>
<OPTION value=Andorra>Andorra</OPTION>
<OPTION value="Ascension Island">Ascension Island</OPTION>
<OPTION value=Australia>Australia</OPTION>
<OPTION value=Austria>Austria</OPTION>
<OPTION value=Belgium>Belgium</OPTION>
<OPTION value=Belize>Belize</OPTION>
<OPTION value=Bermuda>Bermuda</OPTION>
<OPTION value=Brazil>Brazil</OPTION>
<OPTION value=Bulgaria>Bulgaria</OPTION>
<OPTION value=Canada>Canada</OPTION>
<OPTION value="Cayman Islands">Cayman Islands</OPTION>
<OPTION value="Channel Islands">Channel Islands</OPTION>
<OPTION value=China>China</OPTION>
<OPTION value="Cote D'Ivoire">Cote D'Ivoire</OPTION>
<OPTION value=Croatia>Croatia</OPTION>
<OPTION value=Cyprus>Cyprus</OPTION>
<OPTION value="Czech Republic">Czech Republic</OPTION>
<OPTION value=Denmark>Denmark</OPTION>
<OPTION value=Dubai>Dubai</OPTION>
<OPTION value=Estonia>Estonia</OPTION>
<OPTION value=Finland>Finland</OPTION>
<OPTION value=France>France</OPTION>
<OPTION value="French Guiana">French Guiana</OPTION>
<OPTION value="French Polynesia">French Polynesia</OPTION>
<OPTION value=Germany>Germany</OPTION>
<OPTION value=Gibraltar>Gibraltar</OPTION>
<OPTION value=Greece>Greece</OPTION>
<OPTION value=Greenland>Greenland</OPTION>
<OPTION value=Guadeloupe>Guadeloupe</OPTION>
<OPTION value=Guyana>Guyana</OPTION>
<OPTION value="Hong Kong">Hong Kong</OPTION>
<OPTION value=Hungary>Hungary</OPTION>
<OPTION value=Iceland>Iceland</OPTION>
<OPTION value=Iran>Iran</OPTION>
<OPTION value=Iraq>Iraq</OPTION>
<OPTION value=Ireland>Ireland</OPTION>
<OPTION value=Israel>Israel</OPTION>
<OPTION value=Italy>Italy</OPTION>
<OPTION value=Japan>Japan</OPTION>
<OPTION value=Latvia>Latvia</OPTION>
<OPTION value=Liechtenstein>Liechtenstein</OPTION>
<OPTION value=Lithuania>Lithuania</OPTION>
<OPTION value=Luxembourg>Luxembourg</OPTION>
<OPTION value=Malaysia>Malaysia</OPTION>
<OPTION value=Maldives>Maldives</OPTION>
<OPTION value=Malta>Malta</OPTION>
<OPTION value=Martinique>Martinique</OPTION>
<OPTION value=Mauritius>Mauritius</OPTION>
<OPTION value=Mayotte>Mayotte</OPTION>
<OPTION value=Monaco>Monaco</OPTION>
<OPTION value=Netherlands>Netherlands</OPTION>
<OPTION value="New Caledonia">New Caledonia</OPTION>
<OPTION value="New Zealand">New Zealand</OPTION>
<OPTION value=Norway>Norway</OPTION>
<OPTION value=Poland>Poland</OPTION>
<OPTION value=Portugal>Portugal</OPTION>
<OPTION value=Qatar>Qatar</OPTION>
<OPTION value=Reunion>Reunion</OPTION>
<OPTION value=Romania>Romania</OPTION>
<OPTION value=Russia>Russia</OPTION>
<OPTION value=Vietnam>Vietnam</OPTION>
</SELECT>
</form>
<script type="text/javascript">
<!--
document.form1.country.value = "USA";
//-->
</script>