代码示例:(标识:dhtm_dom_image)
<html>
<body>

<img id="image" src="/static/demo/images/eg_smile.gif" />

<script type="text/javascript">
document.getElementById('image').src="/static/demo/images/eg_landscape.jpg"
</script>

<p><b>注释:</b>原始图片是一个笑脸,但是上面的脚本把图片改为风景。</p>

</body>
</html>
运行结果: