2011年8月25日 星期四

@魔法少女小圓全圖

原始碼:
<script type="text/javascript">
function init() {
    var mahou = document.getElementById('mahou');
    var t = new Array(8, 15, 20, 20, 12);
    for(var i=0;i<5;i++) {
        for(var j=1;j<=t[i];j++)
            mahou.innerHTML += "<img src='http://img.atgames.jp/campaign_event/2011/madoka-magica/0816_event/battle/g" + (i+1) + "_" + j + ".jpg' />";
        mahou.innerHTML += "<hr />";
    }
}
window.onload = init;
</script>
<div id="mahou"></div>
全圖:
http://pastehtml.com/view/b4zzix67g.html

後記:
很簡單的雙迴圈讓圖全部顯示-.-

沒有留言: