如何用JavaScript去掉img中多佘的代码 要看清楚了,是你发的这样吗? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 给个代码!谢谢! <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> JS 计算结果的差异 关于<input onClick>的问题 jQuery基础资料 为什么在IE7和Firefox中我的Code中document.body.appendChild好像不工作 firefox下怎么loadXML 再问正则问题 求助如何把参数加入到JS地址中,谢谢 如何在html文件中用javascript语句包含文件 js对输入框检查有效性问题,请高手指点! 数字的位数检查 如何用javascript实现这么一个功能? JS好不好学啊,有没有什么资料库啊??
<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>