我想把一个文本框里面的内容复制到另一个文本框里面显示出来,该怎么做?比如下面
-----------------------------------
<INPUT name=the1 type=text> <INPUT name=Button type=button value=复制the2>
<INPUT name=the2 type=text>
-------------------------------------
我想点击按钮后就把the1里面的内容复制到 the2 里面并且显示出来,该怎么写呢?
-----------------------------------
<INPUT name=the1 type=text> <INPUT name=Button type=button value=复制the2>
<INPUT name=the2 type=text>
-------------------------------------
我想点击按钮后就把the1里面的内容复制到 the2 里面并且显示出来,该怎么写呢?
解决方案 »
- 外行请教 鼠标事件问题
- jsp中JQUERY 如何获得 CHECKBOX是否被选中?--不使用ONCLICK属性
- 高手给看看这是不是Firefox的Bug?
- 求:关于Raphael.javascript的制作折线问题
- 如何button实现控制多个select列表框?
- 求不被任何遮挡的下接菜单,用javascript实现的。好用再送100分!
- again please! net_lover, please check this out.
- js给asp.net页面控件赋值
- fakepath 问题 解决方法
- 在bootstrap导航条中,在script中为了实现当前选择项高亮显示,导致href中的跳转链接失效了
- (100分!!)求一个js计算器
- 如何把html代码中过滤内容?
<INPUT name=Button type=button value=复制the2 onclick='document.getElementById("the2").value=document.getElementById("the1").value'>
<INPUT name=the2 type=text>
顶楼上! 若觉得代码太长一串,可以把javascript:document.getElmentsByName('the2').value=document.getElmentsByName('the1').value
写到JS文件里面去,我想你不会是值做这个例子吧