Benutzer:Ensik: Unterschied zwischen den Versionen

Aus Gronkh-Wiki
Wechseln zu: Navigation, Suche
Zeile 1: Zeile 1:
 
<html>
 
<html>
<link href="css/customAlerts.css" rel="stylesheet">
 
<script src="js/customAlerts.js"></script>
 
 
     <head>
 
     <head>
 
     <script type="text/javascript">
 
     <script type="text/javascript">
Zeile 7: Zeile 5:
 
     {
 
     {
  
var startgame = false;
+
var startgame = confirm("Willst du ein Spiel spielen?");
confirm();
+
if(!startgame){
confirm(
+
alert("Na gut, dann eben nicht :D");
  'I'm a confirm box',
+
}
  function(data){
+
 
  {
+
 
    return : true
+
    title : 'Comfirm Title',
+
    yes : 'Okey',
+
    no : 'No!'
+
  }
+
)
+
  
confirm("test");
 
 
if(startgame){
 
if(startgame){
document.write("<h1>Greetings</h1>");
+
var zufall = Math.floor(Math.random() * 10) + 1;
var test = prompt("Enter Your Name: ", "Name");
+
var c = 0;
alert(test);
+
 
 +
var test = prompt("Du hast 3 Versuche. An welche Zahl (zwischen 1-10) denke ich?: ", "");
 +
while{c < 3){
 +
if(parseInt(test) == zufall){
 +
alert("Jaaa, richtig!! :)");
 +
break;
 +
}
 +
if(parseInt(test) == null){
 +
test = prompt("Nenee, du musst schon ne Zahl angeben (zwischen 1-10):", "");
 +
}else{
 +
c++;
 +
test = prompt("Nope, falsch geraten. Versuchs nochmal! Du hast noch "+(3-c)+" Versuche:", "");
 +
}
 +
}
 
}
 
}
  

Version vom 3. November 2018, 12:26 Uhr

Hello World!