在给下拉框自动赋值时,怎么设置其默认值???
<scripttype="text/javascript">functionsel(){vardata=newArray("中国","日本","韩国","朝鲜","印度"...
<script type="text/javascript">
function sel(){
var data=new Array("中国","日本","韩国","朝鲜","印度");
for(var i=0;i<data.length;i++){
var getData = data[i];
document.getElementById("bookcase").options.add(new Option(getData,getData));
}
}
</script>
<select name="bookcase" style="width:120px;"> 展开
function sel(){
var data=new Array("中国","日本","韩国","朝鲜","印度");
for(var i=0;i<data.length;i++){
var getData = data[i];
document.getElementById("bookcase").options.add(new Option(getData,getData));
}
}
</script>
<select name="bookcase" style="width:120px;"> 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询