5 个解决方案
#1
#2
那是要在table中放text吧 单纯的表格式不能编辑的
#3
用javascript实现
#4
能贴出代码吗?
#5
<html>
<head>
<script>
function changeEdit()
{
var B=document.getElementById('willChange');
var text=B.innerHTML;
B.innerHTML='<input value='+text+'></input>';
}
</script>
</head>
<body>
<table>
<tr>
<td>
<B id='willChange'>将要变成编辑状态</B>
</td>
<td>
</td> <input type='button' value='点我' onclick='changeEdit()'></input>
</tr>
</table>
</body>
</html>
<head>
<script>
function changeEdit()
{
var B=document.getElementById('willChange');
var text=B.innerHTML;
B.innerHTML='<input value='+text+'></input>';
}
</script>
</head>
<body>
<table>
<tr>
<td>
<B id='willChange'>将要变成编辑状态</B>
</td>
<td>
</td> <input type='button' value='点我' onclick='changeEdit()'></input>
</tr>
</table>
</body>
</html>
#1
#2
那是要在table中放text吧 单纯的表格式不能编辑的
#3
用javascript实现
#4
能贴出代码吗?
#5
<html>
<head>
<script>
function changeEdit()
{
var B=document.getElementById('willChange');
var text=B.innerHTML;
B.innerHTML='<input value='+text+'></input>';
}
</script>
</head>
<body>
<table>
<tr>
<td>
<B id='willChange'>将要变成编辑状态</B>
</td>
<td>
</td> <input type='button' value='点我' onclick='changeEdit()'></input>
</tr>
</table>
</body>
</html>
<head>
<script>
function changeEdit()
{
var B=document.getElementById('willChange');
var text=B.innerHTML;
B.innerHTML='<input value='+text+'></input>';
}
</script>
</head>
<body>
<table>
<tr>
<td>
<B id='willChange'>将要变成编辑状态</B>
</td>
<td>
</td> <input type='button' value='点我' onclick='changeEdit()'></input>
</tr>
</table>
</body>
</html>