以下刷新随机显示图片的,要怎么让他显示在html中能点击得了的,就是要怎么加上 href="url"。如何才能实现?
.
tips = new Array(2);
tips[0]="<img src=./img/aaa.gif style= width:100%;height:120px;>";
tips[1]="<img src=./img/bbb.gif style= width:100%;height:120px;>";
index = Math.floor(Math.random() * tips.length);
document.write(tips[index]);