Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <meta charset='UTF-8'>
- <script >
- elstyl="white";
- elstylo="black";
- function f()
- {
- elstyl=document.getElementById("s");
- body=document.getElementById("bodik");
- body.style="background-color:"+elstyl.value+";"+"color:"+elstylo.value+";";
- }
- function p()
- {
- elstylo=document.getElementById("ko");
- body=document.getElementById("bodik");
- body.style="color:"+elstylo.value+";"+"background-color:"+elstyl.value+";";
- }
- function s(){
- napischbk=document.getElementById("w")
- chb1=document.getElementById("chb1");
- if(chb1.checked){zazn="Zaznaczono";}
- else {zazn="Nie Zaznaczono";}
- napischbk.innerHTML=zazn;
- }
- function r(){
- chbkm=document.getElementById("m");
- chbkk=document.getElementById("k");
- napischbpl=document.getElementById("info")
- if(chbkm.checked){pl="Mężczyzna";}
- else if(chbkk.checked){pl="Kobieta";}
- else {pl="Nie Wybrano";}
- napischbpl.innerHTML="Wybrano Płeć: "+pl;
- }
- function n(){
- number=document.getElementById("q");
- alert(number.value);
- }
- //Łukasz turbak to jebana szmata i plik ten nie należy do niego
- </script>
- </head>
- <body id="bodik">
- formularz nieco inny:
- <form name="w" onChange='f()'>
- <select name="s" id='s'>
- <option value="white">wybór koloru</option>
- <option value="aqua">aqua</option>
- <option value="red">czerwony</option>
- <option value="blue">niebieski</option>
- <option value="yellow">żółty</option>
- </select>
- </form>
- wybierz z listy kolor czcionki
- <form name="wybierzkolor">
- <select name="ko" id="ko" onChange="p()">
- <option value="aqua">aqua</option>
- <option value="red">red</option>
- <option value="blue">blue</option>
- </select>
- <hr>
- <input type="checkbox" id="chb1" value="opt1"/>Opcja nr 1
- <input type="button" value="sprCheck" onClick='s()'>
- <p id='w'></p>
- <hr>
- <input type="radio" id="m" name="plec" value="mezczyzna" />
- <label for="plec">mężczyzna</label>
- <input type="radio" id="k" name="plec" value="kobieta" />
- <label for="plec">kobieta</label>
- <input type="button" value="spRadio" onClick='r()'>
- <div id='info'></div>
- <hr>
- <input type="number" id="q" min="1" max="5" onchange='n()'>
- </form>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement