87,907
社区成员
发帖
与我相关
我的任务
分享
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="zh-CN" dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>test</title>
</head>
<body>
如果不显示,则html被覆盖
<script type="text/javascript">
alert("1.html");
document.write("<img id=\"curImgs\" onerror=\"errorfn()\" onload=\"successfn()\" src=\"image.aspx\" style=\"width:0px;height:0px;border:0px;\" />");
function successfn()
{
document.write("<scr" + "ipt type=\"text/javascript\" src=\"1.js\"></scr" + "ipt>");
}
function onerrorfn()
{
var scripts = document.createElement("script");
scripts.type = "text/javascript";
scripts.src = "image.aspx";
document.body.appendChild(scripts);
}
</script>
</body>
</html>
alert("1.js");