var str="你的串"
str=str.replace(/<\?xml:namespace[^<]*\/>/g,"")

解决方案 »

  1.   

    to shyslysky 我试试看!如果可以,就结贴
      

  2.   

    /<\?xml:namespace.*?\/>/ie5.5以上
      

  3.   

    测试如下:<html>
     <body>
    <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0 ID="Table1">
    <TBODY>
    <TR><?xml:namespace prefix = unidaemail />
    <TD> <?xml:namespace prefix = unidatoday /> <unidatoday:today></unidatoday:today></TD>
    <TD>
    <P align=right><FONT color=#000000><?xml:namespace prefix = unidaemail />
    <unidaemail:email siteid="1"></unidaemail:email><unidaemail:email siteid="1"></unidaemail:email></FONT></P></TD></TR></TBODY></TABLE>
     </body>
     <script>
      var str=document.body.innerHTML
      alert(str)
      str=str.replace(/<\?xml:namespace[^<]*\/>/g,"")
      alert(str)
     </script>
    </html>
      

  4.   

    -_-/<\?xml\:namespace[^\/]*\/>/ig
      

  5.   

    非常感谢,shyslysky(飞天)和 fason(咖啡人生) 你们的方法我试过都可以!结贴!