<mce:script ><!-- function changid() { alert(document.getElementById("se").getAttribute("id")); document.getElementById("se").setAttribute("id","te"); alert(document.getElementById("te").getAttribute("id")); } // --></mce:script> <BODY> <table border="1"> <tr> <td id="se" name="se"> test </td> </tr> </table> <input type="button" value="changid" οnclick="changid()">