⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 document_method.html

📁 《JavaScript网页开发体验式学习教程》的源代码
💻 HTML
字号:
<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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -