不晓得哪里错了,为啥没反应呢?
<script type="text/javascript">
function replaceMessage(){
var newnode=document.creatElement("i");
var oldNode=document.getElementById('oldnode');
var oldHTML=oldNode.innerHTML;
oldNode.parentNode.replaceChild(newnode,oldNode);
newnode.innerHTML=oldHTML;
}