新手求教问题。 填写值然后点击确定,值被赋到文本框中,点击修改可以改写文本框中的值按钮默认为确定,填写值之后变为修改请老鸟们帮帮我 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <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> cookie跨域 问题 求个简单的特效 reCAPTCHA问题 javascript 的问题,拜托各位了!!! 动态给text加一个span? 求文本框中时间的正则表达式(需求详见内容),谢谢! 怎样实现这个UBB效果? jquery tablesort排序问题 求问如何改变value值? 关于颜色的问题,比较急,在线等 js怎样把php算好的结果传给html?大神们给力啊! js如何做地理位置分布情况统计?
<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>