87,990
社区成员
发帖
与我相关
我的任务
分享<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>