直接在页面上显示当前年份

在标签内写js,直接document.write

<script type="text/javascript">
                    var date = new Date();
                    document.write( date.getFullYear());
 </script>
原文地址:https://www.cnblogs.com/sspox/p/13256319.html