我正在尝试制作一种新样式的代码框并经常更新外观,所以我希望它拥有所有外部脚本,因此如果我编辑文件,它将更新所有代码框,而不必全部编辑
这是我当前的代码:
<body>
<script>
var time = new Date().getHours();
if (time < 12) {
document.body.style.backgroundColor = 'lightblue';
} else if (time < 15) {
document.body.style.backgroundColor = 'blue'
} else if (time < 18) {
document.body.style.backgroundColor = 'darkblue'
} else {
document.body.style.backgroundColor = 'black'
}
</script>
<center>
<link rel="stylesheet" href="code-box-css.css">
<img src="http://sd-storage.weebly.com/files/theme/thecode.png" alt="The Code">
<br>
<textarea rows="12" name="styled-textarea" id="styled">
<font size=1 face=arial color=#1E83FF>Code From <a href="http://sd-storage.weebly.com/">SD- Storage</a></font>
<!--Do Not Remove Attribution Link-->
</textarea><br>
<font face=Arial color=#1E83FF size="1"><strong>Copyright © <script>
var today = new Date()
var year = today.getFullYear()
document.write(year)
</script> SD-Storage.weebly.com Inc. - All Rights Reserved.
</body>