色尼玛亚洲综合影院,亚洲3atv精品一区二区三区,麻豆freexxxx性91精品,欧美在线91

根據(jù)出生日期自動取得星座的js代碼

無奈啊~只怪讀書時沒有好好用功~看著JavaScript,一個頭頓時變成兩個。。。。。。。。
還好網(wǎng)絡提供了很好的資料庫~看了下,然后自己改了下,基本算能完成任務吧~寫下一份存檔,留待日后
復制代碼 代碼如下:
function xingzuo() {
var start = 1901, date=document.getElementById("txtDay").value, month=document.getElementById("txtMonth").value;;
with (document.getElementById("txtXZ")){
if (month == 1 && date >=20 || month == 2 && date <=18) {value = "水瓶座";}
if (month == 1 && date > 31) {value = "Huh?";}
if (month == 2 && date >=19 || month == 3 && date <=20) {value = "雙魚座";}
if (month == 2 && date > 29) {value = "Say what?";}
if (month == 3 && date >=21 || month == 4 && date <=19) {value = "白羊座";}
if (month == 3 && date > 31) {value = "OK. Whatever.";}
if (month == 4 && date >=20 || month == 5 && date <=20) {value = "金牛座";}
if (month == 4 && date > 30) {value = "I'm soooo sorry!";}
if (month == 5 && date >=21 || month == 6 && date <=21) {value = "雙子座";}
if (month == 5 && date > 31) {value = "Umm ... no.";}
if (month == 6 && date >=22 || month == 7 && date <=22) {value = "巨蟹座";}
if (month == 6 && date > 30) {value = "Sorry.";}
if (month == 7 && date >=23 || month == 8 && date <=22) {value = "獅子座";}
if (month == 7 && date > 31) {value = "Excuse me?";}
if (month == 8 && date >=23 || month == 9 && date <=22) {value = "室女座";}
if (month == 8 && date > 31) {value = "Yeah. Right.";}
if (month == 9 && date >=23 || month == 10 && date <=22) {value = "天秤座";}
if (month == 9 && date > 30) {value = "Try Again.";}
if (month == 10 && date >=23 || month == 11 && date <=21) {value = "天蝎座";}
if (month == 10 && date > 31) {value = "Forget it!";}
if (month == 11 && date >=22 || month == 12 && date <=21) {value = "人馬座";}
if (month == 11 && date > 30) {value = "Invalid Date";}
if (month == 12 && date >=22 || month == 1 && date <=19) {value = "摩羯座";}
if (month == 12 && date > 31) {value = "No way!";}
}
}

JavaScript技術根據(jù)出生日期自動取得星座的js代碼,轉(zhuǎn)載需保留來源!

鄭重聲明:本文版權歸原作者所有,轉(zhuǎn)載文章僅為傳播更多信息之目的,如作者信息標記有誤,請第一時間聯(lián)系我們修改或刪除,多謝。

主站蜘蛛池模板: 凤台县| 云梦县| 门头沟区| 蒲城县| 吉林省| 钦州市| 日喀则市| 武宁县| 随州市| 乌鲁木齐县| 石首市| 清河县| 赞皇县| 宜城市| 和政县| 买车| 乌审旗| 玉溪市| 宣威市| 牟定县| 吕梁市| 龙江县| 苍山县| 芦溪县| 讷河市| 大同市| 若羌县| 临清市| 喀喇沁旗| 舒城县| 柏乡县| 内乡县| 临沂市| 崇州市| 长宁区| 汶川县| 乐至县| 定日县| 达尔| 河曲县| 屯门区|