<html>
<head>
<script>
function myclick(td)
{
td.innerHTML='<input type="text" value="test">';
}
</script>
</head>
<body>
<table border=1>
<tr>
<td onclick="myclick(this);">sss</td>
<td>ss</td>
</tr>
</table>
</body>
</html>
为什么我这个text不能编写内容!
<head>
<script>
function myclick(td)
{
td.innerHTML='<input type="text" value="test">';
}
</script>
</head>
<body>
<table border=1>
<tr>
<td onclick="myclick(this);">sss</td>
<td>ss</td>
</tr>
</table>
</body>
</html>
为什么我这个text不能编写内容!
document.getElementById("a01").focus();
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<style>
</style>
</head><body>
<script>
function myclick(td)
{
td.innerHTML='<input type="text" value="test" onblur="aa(this)">';
}function aa(t){
document.getElementById('t').innerHTML = t.value;
};
</script>
<table border=1>
<tr>
<td onclick="myclick(this);" id="t">sss</td>
<td>ss</td>
</tr>
</table></body>
</html>
<head>
<script>
function myclick(td)
{
td.innerHTML='<input type="text" value="test" onclick="stopMe(event);">';
}function stopMe(e){
e = e || window.event;
if(e.stopPropagation){
e.stopPropagation();
e.preventDefault();
}else{
e.cancelBubble = true;
e.returnValue = false;
}
}</script>
</head>
<body>
<table border=1>
<tr>
<td onclick="myclick(this);">sss</td>
<td>ss</td>
</tr>
</table>
</body>
</html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>演示操作</title>
</head>
<body>
<script language="javascript">
function myclick(td)
{
td.innerHTML='<input type="text" value="test">';
}
</script>
<table border=1>
<tr>
<td onfocus="myclick(this);">sss</td>
<td>ss</td>
</tr>
</table>
</body>
</html>
onfocus="myclick(this);"
<head>
<script>
function myclick(td)
{
if(td.getElementsByTagName('input').length>0) return;
td.innerHTML='<input type="text" value="test">';
}
</script>
</head>
<body>
<table border=1>
<tr>
<td onclick="myclick(this);">sss</td>
<td>ss</td>
</tr>
</table>
</body>
</html>
<script>
function myclick(td)
{
td.innerHTML='<input type="text" value="test" />';
td.onclick="";
}
function aa(t){
document.getElementById('t').innerHTML = t.value;
};
</script>
<table border=1>
<tr>
<td onclick="myclick(this);" id="t">sss</td>
<td>ss</td>
</tr>
</table>
function myclick(td)
{
td.innerHTML='<input type="text" value="test" />';
td.onclick="";
}
</script>
<table border=1>
<tr>
<td onclick="myclick(this);">sss</td>
<td>theforever_csdn</td>
</tr>
</table>