js实现一天自动换一张图记录 发表于 2017-08-30 | 分类于 javascript | 阅读次数: js实现一天自动换一张图记录1234567891011121314151617181920<!DOCTYPE html><html><head> <title></title> <style type="text/css"> img { width: 200px; height: 100px; }</style></head><body> <img id="img" /> <script type="text/javascript"> var imgSrc = new Date().getDate() +'.png'; //var imgSrc = new Date().getSeconds() +'.png'; //测试一秒换一张 document.getElementById('img').src = imgSrc; </script></body></html>