{"id":13405,"student_id":2131,"content":"var Lposition=50,Tposition=50\nfunction keyValue(myEvent) {\nif (document.all) myEvent=event\nversion =navigator.appVersion\nif (version.indexOf(\"MSIE\") == -1){\nmyCode=myEvent.which\n if(myCode==68){ \n Lposition+=5\n my.style.left=Lposition\n }else if(myCode==65){ \n Lposition-=5\n my.style.left=Lposition\n }else if(myCode==39){ \n Lposition+=5\n Tposition+=5\n my.style.left=Lposition\n my.style.top=Tposition\n }else if(myCode==37){ \n Lposition-=5\n Tposition+=5\n my.style.left=Lposition\n my.style.top=Tposition\n }else if(myCode==81){ \n Lposition-=5\n Tposition-=5\n my.style.left=Lposition\n my.style.top=Tposition\n }else if(myCode==69){ \n Lposition+=5\n Tposition-=5\n my.style.left=Lposition\n my.style.top=Tposition\n }else if(myCode==87){ \n Tposition-=5\n my.style.top=Tposition\n }else if(myCode==83){ \n Tposition+=5\n my.style.top=Tposition\n } \n}else{\nmyCode=myEvent.keyCode\n if(myCode==68) {\n Lposition+=5\n my.style.posLeft=Lposition\n }else if(myCode==65){ \n Lposition-=5\n my.style.posLeft=Lposition\n }else if(myCode==87){ \n Tposition-=5\n my.style.posTop=Tposition\n }else if(myCode==83){ \n Tposition+=5\n my.style.posTop=Tposition\n } \n}\n}\ndocument.onkeydown=keyValue\nfunction shoe()\n{ soew = prompt('請問你的帳號');\nif (soew ==='justinsonya28744843') {\nwindow.alert('歡迎'); }\nelse {\nwhile (true) {\nwindow.alert('錯了');\nwindow.alert('你錯了');\n}\n}\n}\nfunction justins()\n{ var enemy = 1300;\nvar hero = 1000;\nvar attack;\nvar kill;\nvar count = 0;\nvar cow;\nvar meow;\nvar soew = window.prompt('請問你的帳號')\nif (soew ==='shoejust') {\nwindow.alert('歡迎'); }\nelse {\nwhile (true) {\nwindow.alert('錯了');\nwindow.alert('你錯了');\n}\n}\nwindow.alert('親愛的勇者,怪獸共有1300滴血,而勇者擁有1000滴血,你的任務是要打敗對手!');\nvar ship = window.prompt('請問你想使用勇者還是怪獸?請回答勇者或怪獸')\nif (ship === '勇者') {\nplayer = hero;\nother = enemy;\nwindow.alert('您已成為勇者');\n} else if (ship === '怪獸') {\nplayer = enemy;\nother = hero;\nwindow.alert('您已成為怪獸');\n} else {\nwindow.alert('請輸入勇者或怪獸回答');\n}\nwindow.alert('戰鬥開始');\nwhile(player \u003e 0 \u0026\u0026 other \u003e 0) {\n attack = Math.floor(Math.random()*31);\n kill = Math.floor(Math.random()*36);\n if (ship === '勇者') {\n document.write('怪獸受到'+ kill +'點的傷害!'+' ');\n document.write('您受到'+ attack +'點的傷害!'+' ');\n player -= attack;\n other -= kill; }\n if (ship === '怪獸') {\n document.write('勇者受到'+ attack +'點的傷害!'+' ');\n document.write('您受到'+ kill +'點的傷害!'+' ');\n player -= kill;\n other -= attack; }\n count++; \n }\nif (player \u003c 0) {\nwindow.alert ('在經過'+count+'回合後,您戰敗了。');\nwindow.alert ('任務失敗');\n} else {\nwindow.alert ('在經過'+count+'回合後,您戰勝了!!!!');\nwindow.alert ('任務成功');\n}\n}\nfunction justinss()\n{ myword = window.prompt(\"請填入文字\");\nmymom = myword.length;\nwindow.alert(mymom+\"個字\");\n}\nfunction calcs() {\nvar abc=eval(window.prompt('請輸入算式'));\nwindow.alert(abc);\n}\nfunction justss()\n{ var soew = window.prompt('請問你的帳號')\nif (soew ==='shoejust') {\nwindow.alert('歡迎'); }\nelse {\nwhile (true) {\nwindow.alert('錯了');\nwindow.alert('你錯了');\n}\n}\nvar word = window.prompt('請問您要做加,減,乘或除法?');\nif (word ==='+') {\nvar num = parseInt(window.prompt('請問您要用的第一個數值?'));\nvar numone = parseInt(window.prompt('請問您要用的第二個數值?'));\nvar total = num + numone;\nwindow.alert('答案是'+total);\n}\nif (word ==='-') {\nvar numo = parseInt(window.prompt('請問您要用的第一個數值?'));\nvar numon = parseInt(window.prompt('請問您要用的第二個數值?'));\nvar totals = numo - numon;\nwindow.alert('答案是'+totals);\n}\nif (word ==='*') {\nvar numoer = parseInt(window.prompt('請問您要用的第一個數值?'));\nvar numooi = parseInt(window.prompt('請問您要用的第二個數值?'));\nvar totaler = numoer * numooi;\nwindow.alert('答案是'+totaler);\n}\nif (word ==='/') {\nvar numoe = parseInt(window.prompt('請問您要用的第一個數值?'));\nvar numooo = parseInt(window.prompt('請問您要用的第二個數值?'));\nvar totalee = numoe / numooo;\nwindow.alert('答案是'+totalee);\n}\n}\nfunction justdoit() {\nLposition=0;\nTposition=0;\ndocument.getElementById('my').style.left = '0';\ndocument.getElementById('my').style.top = '0';\n}\nfunction showtime()\n{ dt = prompt ('1+1+2+3+41+1=多少?');\nif (dt==='4'){\nwindow.alert('this is a trick');\nwhile (true){\nwindow.alert('請關閉視窗');}}\nelse {\nwhile (true){\nwindow.alert('請關閉視窗');}}\n}\nfunction show()\n{ dt = prompt ('1+1+2+3+41+1=多少?');\nif (dt==='1'){\nwhile (true){\nwindow.alert('請關閉視窗');}}\nelse {\nwhile (true){\nwindow.alert('請關閉視窗');}}\n}\nfunction color() {\nwhile(true) {\ndocument.write('\u003cIMG SRC =\"images/backgrounds.jpg\"\u003e')\ndocument.write('\u003cIMG SRC =\"img/car.gif\"\u003e')\n}\n}\nfunction colorsa() {\nmyWin=window.open(\"\",\"subwin\",\"toolbar=0,resizable=1\")\nmyWin.document.write(\"Taiwan number 1\")\n}\nfunction shows()\n{ dt = prompt ('1+1+2+3+41+1=多少?');\nif (dt==='1'){\nwhile (true){\nconsole.log('請關閉視窗');}}\nelse {\nwhile (true){\nconsole.log('請關閉視窗');}}\n}\nfunction color() {\nwhile(true) {\ndocument.write('\u003cIMG SRC =\"images/backgrounds.jpg\"\u003e')\ndocument.write('\u003cIMG SRC =\"img/car.gif\"\u003e')\n}\n}\nfunction setValue() {\ndocument.getElementById(\"test\").value = '--shoejust--';\n}\nfunction setValue2() {\ndocument.getElementById(\"tegt\").value = 'crazyjustinhsu@gmail.com';\n}\nfunction changetimes() {\ndocument.getElementById('choice').textContent = new Date();\n}\nvar soew = window.prompt('請問你的帳號');\nif (soew ==='justinsonya28744843') {\nwindow.alert('歡迎'); }\nelse {\nwhile (true) {\nwindow.alert('錯了');\nwindow.alert('你錯了');\n}\n}","created_at":"2017-03-01T20:52:04.729+08:00","updated_at":"2019-10-25T03:23:29.115+08:00","name":"shoejust","language":"javascript","screenshot":{"url":"https://cdn8.koding.school/uploads/project/screenshot/13405/fd1ac05835b665cf0d7e3c5532c7c2d7.jpg"},"parent_id":2,"plugin":"","description":null,"note":null,"status":"public","like_student_ids":[],"is_featured":false,"views":217,"hashid":"9ygsp9vg","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[{"id":275702,"file_name":"backgrounds.jpg","project_id":13405,"asset_id":33476,"created_at":"2017-10-19T15:55:08.466+08:00","updated_at":"2017-10-19T15:55:08.466+08:00"},{"id":275703,"file_name":"justin.jpg","project_id":13405,"asset_id":33477,"created_at":"2017-10-19T15:55:08.468+08:00","updated_at":"2017-10-19T15:55:08.468+08:00"},{"id":275704,"file_name":"car.gif","project_id":13405,"asset_id":33478,"created_at":"2017-10-19T15:57:51.520+08:00","updated_at":"2017-10-19T15:57:51.520+08:00"}]
橘蘋學習平台
橘蘋學習平台
我的作品
檢視專案頁
匯出
複製
匯入
刪除
下載 Android APP (APK)
截圖
1:1:1
1:1
full
幫助
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦