附上代码:
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Insert title here</title> </head> <body> <table id="test" border="1" width="400px"> <tr><td>疯狂Java讲义</td><td>轻量级Java EE企业应用实战</td></tr> <tr><td>疯狂Ajax讲义</td><td>经典Java EE企业应用实战</td></tr> <tr><td>疯狂XML讲义</td><td>疯狂Workflow讲义</td></tr> </table>
<script>
var tmpIn = document.createElement("input")
tmpIn.type= "text";
var curCell;
function edit(event)
{ if(event==null){ curCell = window.event.srcElement;} else{ curCell = event.target;}
tmpIn.value = curCell.innerHTML;
tmpIn.onblur= end; curCell.innerHTML = "";
curCell.appendChild(tmpIn); }
function end()
{ curCell.innerHTML = tmpIn.value; }
document.getElementById("test").ondbclick = edit;
</script>
</body>
</html>
这个javascript代码是不是已经不能用了