Dev-san

Untitled

Oct 19th, 2014
228
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.68 KB | None | 0 0
  1. <html>
  2.     <head>
  3.         <title> primer4 </title>
  4.         <script type="text/javascript">
  5.             function Tabela(){
  6.                 a = document.getElementById("a").value;
  7.                 b = document.getElementById("b").value;
  8.                 c = document.getElementById("c").value;
  9.                 if (a == "" || b == "" || c == "")
  10.                 {
  11.                     alert("Nekompletni podatoci!!!")
  12.                     return;
  13.                 }
  14.                
  15.                 ia = parseInt(a)
  16.                 ib = parseInt(b)
  17.                 ic = parseInt(c)
  18.                
  19.                 if (((ia + ib) > ic) && ((ia + ic) > ib) && (ib + ic) > ia)
  20.                     alert("Moze da se konstruira triagolnik")
  21.                 else
  22.                     alert("Nemoze da se konstruira triagolnik")
  23.                
  24.                 alert(ia + ", " + ib + ", " + ic);
  25.                
  26.                 var row = document.getElementById("myRow");
  27.                
  28.                 row.insertCell(0).innerHTML += a;
  29.                 row.insertCell(1).innerHTML += b;
  30.                 row.insertCell(2).innerHTML += c;
  31.                 j.innerHTML=("Prijaven vo: "+h+":"+m+":"+s);
  32.            
  33.             }
  34.         </script>
  35.     </head>
  36.     <body>
  37.  
  38.         <div>A:</div>
  39.         <input id="a"></input>
  40.         <div>B:</div>
  41.         <input id="b"></input>
  42.         <div>C:</div>
  43.         <input id="c"></input>
  44.         <br>
  45.         <button onclick="Tabela()"> DODADI </button>
  46.         <button onclick="window.location.replace('http://www.math.com');"> Pomos </button>
  47.         <p id="paragraf"> </p>
  48.         <table border="1">
  49.             <tr id="myRow"> </tr>
  50.         </table><br>
  51.     </body>
  52. </html>
Advertisement
Add Comment
Please, Sign In to add comment