*(&(KJHKJaskj阿克苏机<img onMouseOver=this.style.cursor='pointer' src='images/JoinContact.gif' title='abcd啊啊啊啊'>*(&(KJHKJaskj阿克苏机
想最后获得 abcd啊啊啊啊
解决马上给分。。
------解决方案--------------------
- JScript code
<script language="javascript"> var a="aaa <img onMouseOver=this.style.cursor='pointer' src='images/JoinContact.gif' title='abcdff'> bbb" alert(a) alert(a.replace(/^.*? title=\'([^\']*?)\'.*?$/i,"$1")) </script>
------解决方案--------------------
/title\s*=\s*[\s\S]+?(\'|\")/ig
------解决方案--------------------
把IMG加个ID
var title = getElementById("IMGID").getAttribute("title");