要看清楚了,是你发的这样吗?

解决方案 »

  1.   

    给个代码!谢谢!
      

  2.   

    <textarea style="width:500px;height:500px" id="html">
    <IMG onmouseover="attachimg(this, 'mouseover')" alt=0.jpg src="http://atta.beihai365.com/bbs/forumid_64/20071024_9e91cb22781558d21b96CDv8kcp2MGk6.jpg" ="attachimg(this, 'load')"><p><IMG onmouseover="attachimg(this, 'mouseover')" alt=32.jpg src="http://atta.beihai365.com/bbs/forumid_64/20071024_125983c900dc958eb1c7dhbRf135fVqC.jpg" onload="attachimg(this, 'load')"><IMG onmouseover="attachimg(this, 'mouseover')" alt=30.jpg src="http://atta.beihai365.com/bbs/forumid_64/20071024_7324688c25503f5002f0hx9Too6f1Ium.jpg" onload="attachimg(this, 'load')">
    </textarea><input type="button" value="转换" onclick="parseHTML()" /><textarea style="width:500px;height:500px" id="result">
    </textarea><script>
    function parseHTML(){
    var html=document.getElementById("html").value;
    var reg=/<img[^>]*(src=["']?[^"'<>]+["']?)[^>]*>/ig;
    document.getElementById("result").value=html.replace(reg,"<img $1 />");
    }
    </script>