AutoCAD 3DMAX C语言 Pro/E UG JAVA编程 PHP编程 Maya动画 Matlab应用 Android
Photoshop Word Excel flash VB编程 VC编程 Coreldraw SolidWorks A Designer Unity3D
 首页 > JavaScript

js实现每日自动换一张图片的方法

51自学网 http://www.wanshiok.com
js,每日,自动换图片

本文实例讲述了js实现每日自动换一张图片的方法。分享给大家供大家参考。具体实现方法如下:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/><title>无标题文档</title></head><body> <a target="_blank" id="a"><img id="img" /></a> <script type="text/javascript"> var imgSrc = new Date().getDate() +'.jpg'; document.getElementById('img').src = imgSrc; document.getElementById('a').href = imgSrc ; </script></body></html>

希望本文所述对大家的javascript程序设计有所帮助。


js,每日,自动换图片  
上一篇:js实现使用鼠标拖拽切换图片的方法  下一篇:jQuery仿天猫实现超炫的加入购物车