Mitko_jos

IA_lab05_zad2

Nov 29th, 2013
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <!DOCTYPE HTML5>
  2. <html>
  3.     <head>
  4.         <meta charset="UTF8"/>
  5.  
  6.         <title>Zadaca 2</title>
  7.         <script type="text/javascript">
  8.             function poraka() {
  9.                 var a = document.getElementById('Text1').value;
  10.                 var b = document.getElementById('uime1').value;
  11.                 var pol1 = document.getElementById('pol1');
  12.                 var pol2 = document.getElementById('pol2');
  13.                 if(pol1.checked) pol = pol1.value;
  14.                 if(pol2.checked) pol = pol2.value;
  15.                 var x = document.getElementById("genre");
  16.                 zanr = x.options[x.selectedIndex].value;
  17.            
  18.                 if ((a == null || a == "") || (b == null || b == "")) {
  19.                     alert("Popolnete gi site polinja");
  20.                 } else {
  21.                     alert(a + " " + b + " " + pol + " " + zanr + " uspesno se prijavivte za XFactor!");
  22.                 }
  23.             }
  24.         </script>
  25.  
  26.     </head>
  27.  
  28.     <body>
  29.  
  30.        
  31.             <h2>Форма за пријавување на X-Factor</h2>
  32.             <table>
  33.                 <tr>
  34.                     <td><label for="name">Име</label></td>
  35.                     <td colspan="2">
  36.                     <input type="text" id="Text1">
  37.                     </td>
  38.                 </tr>
  39.  
  40.                 <tr>
  41.                     <td><label for="email">Уметничко име</label></td>
  42.                     <td colspan="2">
  43.                     <input type="uime" id="uime1">
  44.                     </td>
  45.                 </tr>
  46.  
  47.                 <tr>
  48.                     <td><label for="sex">Пол</label></td>
  49.                     <td>
  50.                     <input type="radio" id="pol1" name="pol" value="Машки"
  51.                     checked="checked"/>
  52.                     Машки</td>
  53.                     <td>
  54.                     <input type="radio" id="pol2" name="pol" value="Женски"/>
  55.                     Женски</td>
  56.                 </tr>
  57.                 <tr>
  58.                     <td><label for="genre">Жанр:</label></td>
  59.                     <td colspan="2">
  60.                     <select name="genre" id="genre">
  61.                         <option value="Classical Music">Classical Music</option>
  62.                         <option value="Hip Hop / Rap">Hip Hop / Rap</option>
  63.                         <option value="Jazz">Jazz</option>
  64.                         <option value="Pop (Popular music)">Pop (Popular music)</option>
  65.                         <option value="R&B / Soul">R&B / Soul</option>
  66.                         <option value="Reggae">Reggae</option>
  67.                         <option value="Rock">Rock</option>
  68.                     </select></td>
  69.                 </tr>
  70.  
  71.                 <tr>
  72.                     <td colspan="3">
  73.                     <input type="submit" name="submit" id="submit1" value="Пријави се" onclick="poraka()"/>
  74.                     </td>
  75.                 </tr>
  76.             </table>
  77.             </from>
  78.  
  79.     </body>
  80. </html>
Advertisement
Add Comment
Please, Sign In to add comment