阅读:5308回复:1
帮忙js问题
帮忙看看哦,在IE没问题,在firefox死活没反应
<html> <head> </head> <body> <table width="80%" border="0" id="mytbl"> <tr> <td>ABC</td> <td>abc</td> </tr> <tr> <td>def</td> <td>DEF</td> </tr> </table> <form> <button onclick="changeCell()"> </form> <script language="javascript"> function changeCell(){ var tbl = document.getElementById("mytbl"); tbl.rows[0].cells[0].innerText = "dddddddddddddd"; // tbl.rows[0].cells[0].innerHTML = "<input type='text'>"; } </script> </body> </html> |
|
1楼#
发布于:2008-10-14 19:07
<html> <head> </head> <body> <table width="80%" border="0" > <tr> <td>ABC</td> <td>abc</td> </tr> <tr> <td id="mytbl">def</td> <td>DEF</td> </tr> </table> <button onclick="changeCell()">fsfsafdsa</button> <script language="javascript"> function changeCell(){ var tbl = document.getElementById("mytbl"); tbl.innerHTML = "dddddddddddddd"; // tbl.rows[0].cells[0].innerHTML = "<input type='text'>"; } </script> </body> </html> |
|