测试页面:
<!DOCTYPE html>
<html>
<head>
<script src="http://x.x.x.x:80/js/jquery-1.7.2.min.js"></script>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
JQuery Test:
http://x.x.x.x:80/js/jquery-1.7.2.min.js
<script>
var img = $("<img οnerrοr='alert(/xss/);'>");
img.attr('src','xx');
</script>
</body>
</html>
参考链接:
http://jsbin.com/xiyuwuvubu/edit?html,js,output
https://segmentfault.com/a/1190000002463775
转载于:https://blog.51cto.com/zhpfbk/1898101