【发布时间】:2017-04-17 14:27:23
【问题描述】:
很难形成我的问题标题...我正在编写自己的 windows 侧边栏小工具,我想显示当前的月相,所以我在互联网上搜索了这个,我得到了一个网站显示:
http://www.iceinspace.com.au/moonphase.html
如果我获取图片 url (http://www.iceinspace.com.au/moon/images/phase_150_095.jpg) 并将其设置在图片 src 属性中:
<img id="CurrentMoon" src="http://www.iceinspace.com.au/moon/images/phase_150_095.jpg"></img>
当html文档在javascript中加载时我再次设置:
function showFlyout(event)
{
document.getElementById("CurrentMoon").src = "http://www.iceinspace.com.au/moon/images/phase_150_095.jpg";
}
图片在网上换了会变吗??
【问题讨论】:
标签: javascript html image src windows-desktop-gadgets