Hey nochmal ich nur auf PC hier mein komplettes Script ich hab keine ahnung woran es liegt aber es funktioniert anscheinend nicht damit könntest du mal drüber gucken?
<html>
<head>
<title>
Meine Erste website
</title>
</head>
<style>
body {
background-color: #0B0B61;
}
.alles {
background-color: #A9F5F2;
margin-left: 15px;
border-radius: 18px
}
#Zahlen {
width: 85px;
border-radius: 18px
}
#Sonderzeichen {
width: 70px;
border-radius: 18px
}
#Plusminusmal {
width: 60px;
border-radius: 18px
}
#AC {
width: 130px;
border-radius: 18px
}
#Null {
width: 65px;
border-radius: 18px
}
#durch {
width: 50px;
border-radius: 18px
}
#Istgleich {
width: 70px;
border-radius: 18px
}
</style>
<font color="red">
<b>
<span style="font-size:40">
<center> Willkommen
</center>
</span>
<b/>
</font>
<center>
<br>
</br>
<br>
</br>
<font color="red">
<span style="font-size:15">
<h1>Taschenrechner</h1>
</span>
<b/>
</font>
<body>
<form name="calculator">
</br>
<input
style="font-size:30"
type="textfield"
name="ans"
value=""
/>
<br>
</br>
<br>
<input
id="Zahlen"
class="alles"
style="font-size:90"
type="button"
value="7"
onClick="document.calculator.ans.value+='7'"
/>
<input
id="Zahlen"
class="alles"
style="font-size:90"
type="button"
value="8"
onClick="document.calculator.ans.value+='8'"
/>
<input
id="Zahlen"
class="alles"
style="font-size:90"
type="button"
value="9"
onClick="document.calculator.ans.value+='9'"
/>
<input
id="Plusminusmal"
class="alles"
style="font-size:90"
type="button"
value="+"
onClick="document.calculator.ans.value+='+'"
/>
</br>
<br>
<input
id="Zahlen"
class="alles"
style="font-size:90"
type="button"
value="4"
onClick="document.calculator.ans.value+='4'"
/>
<input
id="Zahlen"
class="alles"
style="font-size:90"
type="button"
value="5"
onClick="document.calculator.ans.value+='5'"
/>
<input
id="Zahlen"
class="alles"
style="font-size:90"
type="button"
value="6"
onClick="document.calculator.ans.value+='6'"
/>
<input
id="Plusminusmal"
class="alles"
style="font-size:90"
type="button"
value="-"
onClick="document.calculator.ans.value+='-'"
/>
</br>
<br>
<input
id="Zahlen"
class="alles"
style="font-size:90"
type="button"
value="1"
onClick="document.calculator.ans.value+='1'"
/>
<input
id="Zahlen"
class="alles"
style="font-size:90"
type="button"
value="2"
onClick="document.calculator.ans.value+='2'"
/>
<input
id="Zahlen"
class="alles"
style="font-size:90"
type="button"
value="3"
onClick="document.calculator.ans.value+='3'"
/>
<input
id="Plusminusmal"
class="alles"
style="font-size:90"
type="button"
value="*"
onClick="document.calculator.ans.value+='*'"
/>
</br>
<br>
<input
id="Null"
class="alles"
style="font-size:90"
type="button"
value="0"
onClick="document.calculator.ans.value+='0'"
/>
<input
id="durch"
class="alles"
style="font-size:90"
type="button"
value="/"
onClick="document.calculator.ans.value+='/'"
/>
<input
id="Istgleich"
class="alles"
style="font-size:90"
type="button"
value="="
onClick="document.calculator.ans.value=eval(document.calculator.ans.value)" />
<input
id="AC"
class="alles"
style="font-size:90"
type="reset"
value="AC"
/>
</br>
</center>
</form>
<script>
function calculateResult() {
var result = eval(document.calculator.ans.value);
if (result > 100) {
alert("Error: Result exceeds 100");
} else {
document.calculator.ans.value = result;
}
}
</script>
</body>
</html>
LG