先进行了测试,我们创建下面的测试环境。
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>测试</title>
<script language="javascript">
alert('start');
document.write("<scr" + "ipt type='text/javascript' src='index.js'></scr" + "ipt>");
alert('end');
</script>
</head>
<body>
</body>
</html>
var str = 'index.js'; document.write("<scr" + "ipt type='text/javascript' src='index1.js'></scr" + "ipt>"); alert('index.js'); alert(str); |
alert(str); str = 'index1.js'; alert('index1.js'); alert(str); |
了解这些字:在的意思 嵌的意思 套的意思 时的意思 的的意思 执的意思 行的意思 顺的意思