document_method.html

来自「用struts开发的多个程序源代码」· HTML 代码 · 共 31 行

HTML
31
字号
<html>
这是最初的内容<br>
<script language="javascript">
	document.write("这是write方法动态写入的内容<br>");
	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("abc<br>");');
		document.writeln('		document.writeln("def<br>");');
		document.writeln('	}');
		document.writeln('</scr' + 'ipt>');
		document.writeln('<input type=button name="update" value="更新" onclick="updatedoc()">');
		//document.close();
		/*document.writeln("abc<br>");
		document.writeln("def<br>");
		document.close();
		var owin = window.open("","_blank");
		owin.document.writeln("xyz<br>");
		owin.document.close();
		owin.document.write("abc<br>");
		owin.document.write("def<br>");
		owin.document.close();*/
	}
</script>
<input type=button name="update" value="更新" onclick="updatedoc()">
</html>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?