Tytu³: 26_11_2018 Wiadomo¶æ wys³ana przez: admin Listopad 26, 2018, 11:18:01 Program restauracja html
--------------------------------------------------------------------------------------- <html><head><meta charset="UTF-8"> <link rel="stylesheet" href="rest.css"></head> <body> <div class="pudlo"> <div class="gora">RESTAURACJA</div> <div class="lewy"> <textarea name="zam" id="a2" rows="20" cols="30"> Twoje zamówienie:</textarea><br> <input type="button" id="wyslij" value="Wy¶lij"> </div> <div class="srodek"> <form id="format"> Podaj imie: <input type="text" id="im2" name="im" value=" "> <input type="button" value="Wy¶lij" onclick="wy()"> </form> <form id="danie" value="Danie g³ówne" > <fieldset><legend>Dania g³ówne</legend> <input type="radio" value="Ham1" name="danie2" id="r1" checked onclick=licz()> Hamburger<br> <input type="radio" value="Ham2" name="danie2" id="r2" onclick=licz()> Wrap-burger<br> <input type="radio" value="Ham3" name="danie2" id="r3"onclick=licz()> Cheeseburger<br> <input type="radio" value="Ham4" name="danie2" id="r4"onclick=licz() > Kebab<br> </fieldset> </form> <script> function wy() {var i=im2.value+" twoje zamówienie:"; document.getElementById("a2").value=i;} </script> </div> <div class="prawy"> <form> <input type="checkbox" value="D1" name="d1" id="m1" onclick=licz()>Sa³ata<br> <input type="checkbox" value="D2" name="d2" id="m2" onclick=licz()>Majonez<br> <input type="checkbox" value="D2" name="d2"id="m3" onclick=licz()>Ketchup<br> <input type="checkbox" value="D2" name="d2" id="m4" onclick=licz()>Frytki<br> </form> <script> function licz(){ var i=im2.value+" twoje zamówienie:"; var a=0; if(document.getElementById("r2").checked){a=1;document.getElementById("a2").value =i+" Wrapburger";}; if(document.getElementById("r1").checked){a=1;document.getElementById("a2").value= i+" Hamburger"}; if(document.getElementById("r3").checked){a=1;document.getElementById("a2").value =i+" Cheeseburger"}; if(document.getElementById("r4").checked){a=1;document.getElementById("a2").value =i+" Kebab"}; var k=a2.value; if((document.getElementById("m1").checked)&&a==1){document.getElementById("a2").value =k+" dodatek:Sa³ata";k=a2.value;}; if((document.getElementById("m2").checked)&&a==1){document.getElementById("a2").value =k+" dodatek:Majonez";k=a2.value;}; } </script> </div> <div class="stopka"> stopka</div> </div></body></html> ---------------------------------------------------------------------------------------------------- |