Dodaj 'testy.html'

This commit is contained in:
Krystian Rzepa 2018-12-04 17:34:04 +00:00
parent 4a58094e5d
commit dca8921a86
1 changed files with 81 additions and 0 deletions

81
testy.html Normal file
View File

@ -0,0 +1,81 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JavaScript</title>
<script type="text/javascript">
window.onload = PokazNumer;
window.onbeforeunload = PokazNumer;
var liczba1, liczba2;
function PokazNumer() {
alert("s439474");
}
function dodawanie() {
liczba1=document.getElementById("pole_1").value;
liczba2=document.getElementById("pole_2").value;
liczba1=eval(liczba1);
liczba2=eval(liczba2);
document.getElementById("text_1").innerHTML="Wynik:"+(liczba1+liczba2);
}
function odejmowanie() {
liczba1=document.getElementById("pole_1").value;
liczba2=document.getElementById("pole_2").value;
document.getElementById("text_1").innerHTML="Wynik:"+(liczba1-liczba2);
}
function mnozenie() {
liczba1=document.getElementById("pole_1").value;
liczba2=document.getElementById("pole_2").value;
document.getElementById("text_1").innerHTML="Wynik:"+(liczba1*liczba2);
}
function dzielenie() {
liczba1=document.getElementById("pole_1").value;
liczba2=document.getElementById("pole_2").value;
document.getElementById("text_1").innerHTML="Wynik:"+(liczba1/liczba2);
}
</script>
<script type="text/javascript" async
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.4/MathJax.js?config=TeX-MML-AM_CHTML" async>
MathJax.Hub.Config(
{
tex2jax:
{
inlineMath: [ ['$','$'], ["\\(","\\)"] ],
displayMath: [ ['$$','$$'], ["\\[","\\]"] ],
}
} );
</script>
</head>
<body>
<b>Kryterium zbieżności Cauchy'ego: </b><br />
Jeżeli szereg $\sum_{n=1}^{\infty} a_n$ jest szeregiem o wyrazach nieujemnych oraz $g=\lim_{n \rightarrow \infty} \sqrt[n]{a_n}$, to <br />
- jeżeli $g<1$, to szereg jest zbieżny. <br />
- jeżeli $g>1$, to szereg jest rozbieżny.
<br /> <br /> <br />
<b>KALKULATOR</b><br /><br />
Wprowadź dwie liczby:
<input type="number" id="pole_1" />
<input type="number" id="pole_2" />
<input type="submit" id="button1" value="Dodawanie" onclick="dodawanie()" />
<input type="submit" id="button2" value="Odejmowanie" onclick="odejmowanie()" />
<input type="submit" id="button3" value="Mnożenie" onclick="mnozenie()" />
<input type="submit" id="button4" value="Dzielenie" onclick="dzielenie()" />
<div id="text_1"></div><br>
<script type="text/javascript">
window.onbeforeunload = function() {
return "s439474";
}
</script>
</body>
</html>