程式 葛蘭碎碎唸 網頁元件

[Coding] Bag Raid 值週生產生器

Post date: 星期一, 3月 29, 2010

2010/03/30
晚間由元氣妞抽出下週值週生,週五將同步公開抽獎時況,盡請期待...

2010/03/29
最近貓大王參加了蘇菲家的『包包突擊單元』,派給了我一個任務,就是要想辦法產生下週的值日生。平時宅宅的我沒啥專長,寫寫這類的程式算是小蛋糕一個,但沒想到寫程式不到一分鐘,要上到這個 blog 可是費盡苦頭,原因是外掛太多支 Javascript 造成互相干擾,又懶得一一 debug,所以就摘摘摘掉 fancy 的畫面,反正可以 work 就好 XD

為求公正公開,source code 讓大家 review 一下~

<script language="javascript">
function bagRaid() {
bagRaidList = new Array("kaoriroom", "wendy32lin", "Linda", "chienchien", "tzutzu543", "Kay", "yingying13", "sea929", "pinkyface", "meggie", "springching", "mollazysfp(EvonnePen)", "monkeyban", "Gwen", "ayano1676", "felice", "oik012", "wechi164");

alert("恭喜 " + bagRaidList[Math.floor(Math.random()*bagRaidList.length)] + " 成為包包突擊單元下週值日生");
}
</script>




You Might Also Like

Comments on Facebook:

0 意見

Like us on Google+





Like us on Facebook