笨笨網站超級論壇 (綠色版本)


頁: [1]

#1  年份生肖換算機 -  (Administrator) 發表於 31-5-2012 12:04

<script type="text/javascript"><!--
function getpet() {
var toyear = 1997;
var birthyear = document.getElementById("inyear".value;
x = (toyear - birthyear) % 12
if ((x == 1) || (x == -11)) {birthpet="鼠"}
else if (x == 0) {birthpet="牛"}
else if ((x == 11) || (x == -1)) {birthpet="虎"}
else if ((x == 10) || (x == -2)) {birthpet="兔"}
else if ((x == 9) || (x == -3)) {birthpet="龍"}
else if ((x == 8) || (x == -4)) {birthpet="蛇"}
else if ((x == 7) || (x == -5)) {birthpet="馬"}
else if ((x == 6) || (x == -6)) {birthpet="羊"}
else if ((x == 5) || (x == -7)) {birthpet="猴"}
else if ((x == 4) || (x == -8)) {birthpet="雞"}
else if ((x == 3) || (x == -9)) {birthpet="狗"}
else if ((x == 2) || (x == -10)) {birthpet="豬"}
else {birthpet="輸入錯誤"}
document.getElementById("birth".innerHTML = birthpet;}
// --></script>
出生年份:<input type="text" size="5" id="inyear" />
<input type="button" value="開始" onclick="getpet()" />
生肖是:<span id="birth"></span>

#2  ar - 珍妮 (Moderator) 發表於 2-11-2014 18:04

蛙大師,雖然我係05年出世,但我屬猴,唔係屬雞,拿,05年的2月先正式系雞年,1月仲系猴年。。。。。
唔信的話就看我的個人資料啦,My birthday is in January lo
頁: [1]

Powered by Discuz Simply! 0.54 Released © wxyuan90