Darmowe Forum

Java Script => Java Script => Wątek zaczęty przez: admin Październik 26, 2018, 11:05:40



Tytuł: Zadanie 26_10_2018 <textarea>
Wiadomość wysłana przez: admin Październik 26, 2018, 11:05:40
----------------------- HTML -------------------------------
<html><head><meta charset="UTF-8">
<link rel="stylesheet" href="adam_div.css"></head>
<body>
<div class="pudlo"><div class="radio"></div>
<div class="radzio">
Dane: <br>
<br><input type="text" id="imie2" value=""><br><br>
<br><input type="text" id="nazwisko2" value=""><br><br>
<br><input type="text" id="wiek2" value=""><br><br>
<textarea rows="10" cols="20" id="tekst" name="ss"></textarea><br>

</div>
<div class="radzio1"><br>
Imie: <input type="text" id="imie" value=""><br><br>
Nazwisko: <input type="text" id="nazwisko" ><br><br>
Rok urodzenia: <input type="text" id="weronika" >
 <br><br><input type="button" onclick="czysc()" value="Kasuj" id="A5">
<input type="button" onclick="czytaj()" value="Wpisz" id="A5"><br>

 <script>
 function czytaj(){
 var im=document.getElementById("imie").value;
 var nazw=document.getElementById("nazwisko").value;
 var rok=document.getElementById("weronika").value;
 var iml=im.length-1;
 var w,y; y=parseInt(rok); w=2018-y;
 var ewa='',z,x; z=iml;
 for(x=z;x>=0;x--){ewa=ewa+im [ x ];};
 document.getElementById("imie2").value="Imie "+ewa+" liczba= "+im.length;
 document.getElementById("nazwisko2").value= "Nazwisko: "+nazw;
 document.getElementById("wiek2").value="Wiek: "+w;
 document.getElementById("tekst").value="adam";
 }
 
 function czysc(){document.getElementById("imie").value=" ";
 document.getElementById("nazwisko").value=" ";
 document.getElementById("weronika").value=" ";
 document.getElementById("imie2").value=" ";
 document.getElementById("nazwisko2").value=" ";
 document.getElementById("wiek2").value=" ";
 document.getElementById("tekst").value="";
 }
 </script></div>
 <div class="radzio2"><p id="rr"></p></div>
<div class="stopka"> stopka</div> 
</div></body></html>

---------------------------------- css -------------------------------------------------

.pudlo {
background-color:#FFAA00;
width:800px;
height:600px}
.radio {
float: left;
width:800px;
height:50px;
background-color:#aaaaaa
}
.radzio {
float: left;
width:200px;
height: 500px;
background-color: #FFAAAA
}
.radzio1 {
float: left;
width:400px;
height: 500px;
background-color: #00ff00
}
.radzio2 {
float: left;
width:200px;
height: 500px;
background-color: #ffaaff
}
.stopka {
float: left;
width:800px;
height: 50px;
background-color: #AAAAff
}


Polityka cookies
Darmowe Fora | Darmowe Forum

swietageometria darkwarriors freeforall mundodetelenovelas zostangwiazda