oldnode=document.getElementsByTagName("b")。用这个为什么不行?
<script type="text/javascript"> function replaceMessage(){ var newnode=document.createElement("i"); var oldnode=document.getElementsByTagName("b"); newnode.innerHTML=oldnode.innerHTML; oldnode.parentNode.replaceChild(newnode,oldnode); } </script>