几个网页制作的小技巧

让浏览器在保存页面时失败在页面源文件上增加下面一行代码,保存页面时,就会报错误:
<noscript><iframe src="*.html"></iframe></noscript>

防止被人frame 或者 iframe 包含我们的页面:
<script language="javascript">
<!-- if (top.location != self.location) top.location = self.location; //-->
</script>

脚本出错时,也不提醒
<script language="javascript">
<!-- function killErrors() { return true;} window.onerror = killErrors; //-->
</script>

自动显示最后更新时间
<script language="JavaScript">
<!--hide script from old browsersdocument.write("本页最后更新日期: " + document.lastModified + "")
// end hiding -->
</script>
"document.lastModified” 得到的是文件最后更新时间,这样我们就不用更新文件的时候,再更新对应页面文本了。  

原文地址:https://www.cnblogs.com/liaobin/p/1756385.html