JavaScript 前端页面示例:动态添加内容
<html>
<head>
<title>My First Web Page</title>
</head>
<body>
<h1>Welcome to My First Web Page</h1>
<p>This page was written with JavaScript.</p>
<script>
// your javascript code goes here
document.write('<h2>This is some content written with JavaScript!</h2>');
</script>
</body>
</html>
原文地址: https://www.cveoy.top/t/topic/llkS 著作权归作者所有。请勿转载和采集!