图片自动更新(说明)
发布时间:2024-04-28 09:46:51
标签:图片自动更新(说明)
这是个“懒人”用的办法,你没有时间更新主页,却又不能让三个月前的更新还标着"new",那么用这个js可以帮你的大忙!
这个图片将在2000年1月1日自动消失。
copy下面的代码到你的html文件的<body>和</body>之间:
<script>
<!--
var imagetag='<img src="news.gif" alt="1">' var today=new Date() function expireat(expiredate){ var expire=new Date(expiredate) if (today.getTime()<=expire.getTime()) document.write(imagetag) }
//-->
</script>
<script>
expireat("january 1, 2000")
</script>
0
投稿
猜你喜欢
- 直接分析,如原矩阵如下(1): (1) 我们要截取的矩阵(取其一三行,和三四列数据构成矩阵)为如下(2): (2)错
- 测试题defer有一些规则,如果不了解,代码实现的最终结果会与预期不一致。对于这些规则,你了解吗?这是关于defer使用的代码,可以先考虑一
- 本文实例讲述了python去除文件中空格、Tab及回车的方法。分享给大家供大家参考,具体如下:在最近的开发工作中,为了应付比赛赶进度,服务端
- window.onload 是页面全部加载完成,包括图片、CSS、JavaScript等。但加载JavaScript的方法有很多种
- 用了两种方式解决该问题,都是网上现有的解决方案。场景说明:有一个数据文件,以文本方式保存,现在有三列user_id,plan_id,mobi
- MySQL默认编码是latin1,因业务需要把它转到UTF8。1、导出数据导出表结构 mysqldump -d dataname >
- 视频加密流程图:后端获取保利威的视频播放授权token,提供接口api给前端参考文档:http://dev.polyv.net/2019/v
- 本文实例为大家分享了Python实现简单飞机大战的具体代码,供大家参考,具体内容如下功能玩家飞机可以移动,可以发射 * ,敌机随机产生,自由坠
- 实现效果通过源图片,在当前工作目录的/img目录下生成1000张,分别从1*1到1000*1000像素的图片。效果如下:目录结构实现示例#
- 基础知识介绍以SQL Server的数据库管理工具SSMS(SQL Server Management Studio)为平台进行操作。SQL
- 在使用SQL Server 的过程中,由于经常需要从多个不同地点将数据集中起来或向多个地点复制数据,所以数据的导出,导入是极为常见的操作.我
- 作者:JavaScript Kit译者:子乌(Sheneyan)翻译日期:2006-02-12英文原文:Conditional Compil
- 本文介绍,在 VSCode 使用 IPython Kernel的设置方法,详细介绍如下所示:要达到的效果:只需按下 Ctrl+;,选中的几行
- <form action="calscore.asp?action=do" met
- 创建视图创建视图success.blade.php<!doctype html><html lang="{{ s
- 背景基于现在微服务或者服务化的思想,我们大部分的业务逻辑处理函数都是长这样的:比如grpc服务端:func (s *Service) Get
- 一、HandlerSocket是什么?HandlerSocket是akira higuchi写的一个MySQL的插件。以MySQL Daem
- 本文为大家分享了MySql安装与卸载的教程,供大家参考,具体内容如下一、MYSQL的安装1、打开下载的mysql安装文件,双击运行mysql
- <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN&
- 本文实例讲述了Python装饰器用法。分享给大家供大家参考,具体如下:无参数的装饰器#coding=utf-8def log(func):