<html>
<script language="javascript">
function updatedoc()
{
document.writeln("abc<br>");
document.writeln("def<br>");
document.writeln('<script language="javascript">');
document.writeln('function updatedoc()');
document.writeln('{');
document.writeln(' document.writeln("first<br>");');
document.writeln(' document.writeln("second<br>");');
document.writeln('}');
document.writeln('</scr'+'ipt>');
document.writeln('<input type=button name="update" value="更新" onclick="updatedoc()">');
}
</script>
<input type=button name="update" value="更新" onclick="updatedoc()">
</html>
/*这里不能写作</script>,否则系统会报错,其默认与上面的<script language="javascript"> 匹配。所以应当注意^_^*/
URL:http://www.cnblogs.com/happiness/archive/2006/04/18/377880.html
<script language="javascript">
function updatedoc()
{
document.writeln("abc<br>");
document.writeln("def<br>");
document.writeln('<script language="javascript">');
document.writeln('function updatedoc()');
document.writeln('{');
document.writeln(' document.writeln("first<br>");');
document.writeln(' document.writeln("second<br>");');
document.writeln('}');
document.writeln('</scr'+'ipt>');
document.writeln('<input type=button name="update" value="更新" onclick="updatedoc()">');
}
</script>
<input type=button name="update" value="更新" onclick="updatedoc()">
</html>
/*这里不能写作</script>,否则系统会报错,其默认与上面的<script language="javascript"> 匹配。所以应当注意^_^*/
URL:http://www.cnblogs.com/happiness/archive/2006/04/18/377880.html
作者:jackxiang@向东博客 专注WEB应用 构架之美 --- 构架之美,在于尽态极妍 | 应用之美,在于药到病除
地址:https://jackxiang.com/post/1065/
版权所有。转载时必须以链接形式注明作者和原始出处及本声明!
评论列表