新手求教问题。

qq290048913 2011-07-20 08:02:32


填写值然后点击确定,值被赋到文本框中,点击修改可以改写文本框中的值
按钮默认为确定,填写值之后变为修改
请老鸟们帮帮我
...全文
82 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
qq290048913 2011-07-20
  • 打赏
  • 举报
回复
[Quote=引用 2 楼 confidenceyu 的回复:]

直接把值传到后台,然后直接赋值
[/Quote]
不是这样的,你们能加我QQ吗?我不会发图片。想找个人指导一下
lsw645645645 2011-07-20
  • 打赏
  • 举报
回复
上面说的很清楚啦
MadEric 2011-07-20
  • 打赏
  • 举报
回复
支持3楼的方法
路过的码农 2011-07-20
  • 打赏
  • 举报
回复
3楼差不多了
豆虫 2011-07-20
  • 打赏
  • 举报
回复
<html>
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="this is my page">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<head>
<script language=javascript>
function change(){
var btn = document.getElementById('btn1');
var tx2 = document.getElementById('tx2');
var tx1 = document.getElementById('tx1');
if(btn.value == '确定'){
tx2.value = tx1.value;
tx1.style.display = 'none';
tx2.style.display = '';
btn.value = '修改'
}else{
tx1.style.display = '';
tx2.style.display = 'none';
btn.value = '确定'
}
}
</script>
</head>
<body>
<table>
<tr>
<td>
<input type="text" id="tx1">
<input type="text" id="tx2" style="display: none" disabled="disabled">
</td>
<td>
<input type="button" id="btn1" value="确定" onclick="change()">
</td>
</tr>

</table>
</body>
</html>

confidenceyu 2011-07-20
  • 打赏
  • 举报
回复
直接把值传到后台,然后直接赋值
qq290048913 2011-07-20
  • 打赏
  • 举报
回复
可以加我QQ290048913,我是新手,不会传图片,辛苦大大们了

87,990

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧