当单选按钮选择列表框更改并将空值传递给每个列表框时......如空值或空白......
它的java脚本代码::
<div>
<input type="radio" name="rdo" id="rdo1" value="list1" />Radio1
<select id="select1" style='display:none;'>
<option value="l1">1.1</option>
<option value="l2">2.2</option>
</select>
</div>
<div>
<input type="radio" name="rdo" id="rdo2" checked="checked" value="list2"/>Radio2
<select id="select2">
<option value="l1">2.1</option>
<option value="l2">2.2</option>
</select>
</div>
<script>
function select1() {
document.getElementById("select1").style.display="block";
document.getElementById("select2").style.display="none";
}
function select2() {
document.getElementById("select2").style.display="block";
document.getElementById("select1").style.display="none";
}
document.getElementById("rdo1").onclick = select1;
document.getElementById("rdo2").onclick = select2;
</script>