Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <script>
- function licz()
- {
- var wynik = document.createElement("div");
- var zapelniacz = document.createElement("div");
- var dzialanie = document.getElementById('io').value+'='+eval(document.getElementById('io').value);
- wynik.innerHTML = dzialanie;
- wynik.style.width='auto';
- zapelniacz.className='lol';
- document.body.appendChild(wynik);
- document.body.appendChild(zapelniacz);
- //document.getElementById('wynik').innerHTML+='<br>'+document.getElementById('io').value+'='+eval(document.getElementById('io').value);
- }
- </script>
- <html lang="pl">
- <head>
- <meta charset="utf-8">
- <title>Zadanie 7</title>
- <style>
- h1 {color:red; margin-left:50px; font-variant:small-caps;}
- div {background-color:lightblue; border:2px solid black; display: inline-block;}
- .lol {display:block; border: none; width: 100px;}
- </style>
- </head>
- <body>
- <h1>Kalkulator</h1>
- <input id="io">
- <button onclick="location=location">Wyczyść</button>
- <button onclick="licz();">licz</button>
- <br>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement