一个界面中有两个文本域,当填写第一个文本域,第二个文本域会自动与第一个文本域值统一
// 第一个文本域
<textarea name="a" id="deploy_reason_desc" rows="6" cols="60" style="width:85%"></textarea>//第二个文本域<textarea name="b" id="deploy_summary" rows="4" cols="60" style="width:85%" value=""></textarea>
// 第一个文本域
<textarea name="a" id="deploy_reason_desc" rows="6" cols="60" style="width:85%"></textarea>//第二个文本域<textarea name="b" id="deploy_summary" rows="4" cols="60" style="width:85%" value=""></textarea>
解决方案 »
- Ibatis oracle 自动编号 老是出现java.sql.SQLSyntaxErrorException: ORA-02289: 序列不存在
- spring的问题 求解
- 这样用for来显示一个数据集错误吗?
- struts中配置文件的映射路径问题
- 迷茫……,对以前没有web服务的web程序有所了解(请问tomcat)
- ==给分贴,chongkai请进!==
- jsp mysql 连不上~快疯了!!
- javabean读取txt文件非常奇怪的问题!!!!!!!!!!!!!!!!
- 谁知道好的单文件调试器?
- java正则取string中所需信息
- jar命令的使用
- getHibernateTemplate().save()不能向数据库中插入数据
document.getElementById("deploy_reason_desc").value=document.getElementById("deploy_summary").value;
document.forms[0].b.value;
不确定是哪种,但都可以试试,基本上就是这两种方法啦1、document.getElementById(deploy_reason_desc').innerText = document.getElementById(deploy_summary').innerText2、document.getElementById("deploy_reason_desc").value=document.getElementById("deploy_summary").value;
document.getElementById("deploy_summary").value=document.getElementById("deploy_reason_desc").value;
}
/ 第一个文本域
<textarea name="a" id="deploy_reason_desc" rows="6" cols="60" style="width:85%" onchange="change()"></textarea>
function change(){
document.getElementById("deploy_reason_desc").value=document.getElementById("deploy_summary").value;
}
document.getElementById("deploy_reason_desc").value=document.getElementById("deploy_summary").value;}