我想这样,当我选中某个下拉框的一个选项时,下面的的某个输入框名称会变化............. http://fason.nease.net/samples/select/看他的源代码 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 通话 stlye="display:none"来判断根据下拉框得onchange 得到当前选择的值,来控制应该将那个txt显示出来。获取值时也是这样。 <tr> <td bgcolor="#e9f0fe" width="21%">续收费内容:</td> <td width="79%"> <select name="j_a_name" onchange='setText(this.value)'> <option value="1" selected>系统维护费</option> <option value="2">维护卡</option> <option value="3">数据传输费</option> <option value="4">其它</option> </select> </td> </tr> <tr> <td bgcolor="#e9f0fe" width="21%" id='tdText'> 合同签订日期:</td> <td width="79%" id='tdInput'> <input type="text" name="j_a_signdate" class="nb" size="10" onChange="return isDate(this)"> </td> </tr><script>function setText(v){ switch(v) { case 1: text = "合同签订日期:"; input = '<input type="text" name="j_a_signdate" class="nb" 'size="10" onChange="return isDate(this)">' ; case 2: text = "你自己写吧"; input = "自己写"; case 3: text = "数据传输开通日期:"; input = '<input type="text" name="j_a_transdate" class="nb" size="10" onChange="return isDate(this)"> '; } tdText.innerText = text; tdInput.innerHTML = input;}</script> 初学者PHP DR与Wampserver 用php尝试上传文件,遇到了点问题 SESSION和验证码的奇怪问题 php中实现的链表有意义吗 css显示图片的问题,请帮忙呀 FCKeditor_2.6.1上传图片的问题.高手请指点一下 求救PHP结果集用HTML显示!!! 找一PHP熟手帮我改点儿东西,报酬1000元 求分页显示代码? 如何不用submit按钮而用button来提交表单? button 调用 php 函数的问题? 这个错误什么意思啊?????
根据下拉框得onchange 得到当前选择的值,来控制应该将那个txt显示出来。获取值时也是这样。
<td bgcolor="#e9f0fe" width="21%">续收费内容:</td>
<td width="79%">
<select name="j_a_name" onchange='setText(this.value)'>
<option value="1" selected>系统维护费</option>
<option value="2">维护卡</option>
<option value="3">数据传输费</option>
<option value="4">其它</option>
</select>
</td>
</tr> <tr>
<td bgcolor="#e9f0fe" width="21%" id='tdText'> 合同签订日期:</td>
<td width="79%" id='tdInput'>
<input type="text" name="j_a_signdate" class="nb" size="10" onChange="return isDate(this)">
</td>
</tr>
<script>
function setText(v)
{
switch(v)
{
case 1:
text = "合同签订日期:";
input = '<input type="text" name="j_a_signdate" class="nb" 'size="10" onChange="return isDate(this)">' ;
case 2:
text = "你自己写吧";
input = "自己写";
case 3:
text = "数据传输开通日期:";
input = '<input type="text" name="j_a_transdate" class="nb" size="10" onChange="return isDate(this)"> ';
}
tdText.innerText = text;
tdInput.innerHTML = input;
}
</script>