|
|
动态改变表格单无格内容 |
|
|
作者:未知 来源:月光软件站 加入时间:2005-2-28 月光软件站 |
<html> <head> <title>test</title> <script language="javascript"> function addText() { var strText="<font color=red>改变后的表格内容</font>"; document.all("td1").insertAdjacentHTML("beforeEnd",strText); //document.all("td1").innerHTML=strText; // //document.all("td1").innerText=strText; //document.all("td1").insertAdjacentText("beforeEnd",strText); } </script> </head> <body> <input type="button" onclick=addText() value="改变表格内容" /> <input type="button" onclick="td1.innerHTML='';" value="清除"> <div id="id1"> </div> <table id="ta1"> <tr><td id="td1">表格内容</td></tr> </table> </body> </html>
|
|
相关文章:相关软件: |
|