我想这样,当我选中某个下拉框的一个选项时,下面的的某个输入框名称会变化............. 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如何生成系统 crontab 每分执行一次设置? 菜鸟问题,php代码解释 如何把从数据库读取到的记录返回到数组中 MySQL连接不上了,恳请帮助! csubstr函数怎样修改成可截取utf8格式的? PHP里为何不能调用javascript里的open()函数? php中用javascript的问题(符代码) 为什么表单中有些数据不能提取到PHP中 关于php递归返回值的困惑 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>