LutfullahUygur Posted March 15, 2015 Share Posted March 15, 2015 (edited) Hızlı İşlem Yapabilecek Kod ; 1- Rastgele işlem yapılacak toplama veya çıkarma 2- Cevaplara göre doğru yanlış kutusu olacak ve artacak 3- çıkarma işleminde büyükten küçük çıkarılacak sol veya sağ kutu önemli değil Son gönderim Tarihi : 16 mart saat:11:00 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>HIZLI İŞLEM</title> <style type="text/css"> .kutu { text-align:center; margin:10px; height: 100px; width: 200px; border: 1px solid #000; float: left; font-size: 80px; line-height: 100px; } </style> <script> function tuslar(event) { var sonuc=Number(document.getElementById("cevap").value); var s1=Number(document.getElementById("s1").innerHTML); var s2=Number(document.getElementById("s2").innerHTML); if (event.keyCode==13) { if (sonuc==s1+s2) document.getElementById("cevap").style.backgroundColor="#9F9"; else document.getElementById("cevap").style.backgroundColor="#F99"; document.getElementById("cevap").select(); } } function rastgeleSayiYaz() { document.getElementById("s1").innerHTML=Math.round(Math.random()*9); document.getElementById("s2").innerHTML=Math.round(Math.random()*9); } </script> </head> <body> <div id="s1" class="kutu"></div> <div id="islem" class="kutu">+</div> <div id="s2" class="kutu"></div> <div style="clear:both"></div> <input id="cevap" type="text" class="kutu" style="width:650px;" onkeydown="tuslar(event)"> <script> rastgeleSayiYaz(); document.getElementById("cevap").select(); var zaman=setInterval(function () {rastgeleSayiYaz()},3000); </script> </body> </html> Hocanın Şartları bunlar ben sadece Toplamayı yapabildim , Random işlem yok şartları sağlayamıyorum yardım edermisiniz lütfen Edited March 15, 2015 by LutfullahUygur Quote Link to comment Share on other sites More sharing options...
LutfullahUygur Posted March 15, 2015 Author Share Posted March 15, 2015 Kimse yardım etmedi ama genede teşekkür ederim , Çözdüm problemimi :D Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.