日期:2014-05-16 浏览次数:20365 次
<select id="dt" onchange="changeType(this.value)" >
<option value="age" >年龄</option>
<option value="birth" >年龄</option>
</select>
<div id="inputs" ></div>
<script>
function changeType(t){
document.getElementById('inputs').innerHTML=
t=='age'?'<input name="d1" value="30" >-<input name="d2" value="60" >岁':
'<input name="d1" value="1980" >-<input name="d2" value="1990" >年'
}
changeType('age')
</script>