Advertisement
Guest User

Untitled

a guest
May 28th, 2018
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.75 KB | None | 0 0
  1. <head>
  2. <script language="javascript">
  3.  
  4. function wyswietlWynik(){
  5. if(document.form.halko.value=="A"){
  6. alert("Wybrano A")
  7. }
  8. else if(document.form.halko.value=="B"){
  9. alert("Wybrano B")
  10. }
  11. else if(document.form.halko.value=="C"){
  12. alert("Wybrano C")
  13. }
  14. else if(document.form.halko.value==""){
  15. alert("Nic nie wybrano")
  16. }
  17.  
  18.  
  19. }
  20.  
  21.  
  22.  
  23.  
  24. </script>
  25. </head>
  26. <body>
  27. <form name="form" method="post" onSubmit="wyswietlWynik()">
  28. <select size="3" value="abc" name="halko">
  29. <option value="A"/>A
  30. <option value="B"/>B
  31. <option value="C"/>C
  32. </select>
  33. <input type="submit" value="Przeslij"/>
  34. </form>
  35. </body>
  36.  
  37.  
  38.  
  39. <html>
  40. <head>
  41. <script language="javascript">
  42.  
  43.  
  44.  
  45. function sprawdz(x){
  46. wzor2=/^[0-4a-zA-Z6-9]*([5]{1})[0-4a-zA-Z6-9]*$/
  47. if(x.value.match(wzor2)){
  48. alert("Jest dokladnie jedna 5")
  49. return false
  50. }
  51. }
  52.  
  53.  
  54.  
  55.  
  56. </script>
  57. </head>
  58. <body>
  59. <form name="form" method="get" ">
  60. <input type="text" name="halko" size="30" maxlength="10" onBlur="sprawdz(this)"/><br>
  61.  
  62.  
  63. </form>
  64. </body>
  65. </html>
  66.  
  67.  
  68.  
  69.  
  70. <?php
  71. $c=pg_connect("host=sbazy dbname=s199212 user=s199212 password=besiaczek09");
  72. $nazwisko="select nazwisko from studenci where id_studenta=5";
  73. $r=pg_exec($c, $nazwisko);
  74.  
  75.  
  76. $liczba_wierszy=pg_numrows($r);
  77. $liczba_kolumn=pg_numfields($r);
  78. print "Zapytanie zwróciło ".$liczba_wierszy." wierszy oraz
  79. ".$liczba_kolumn." kolumn<br>";
  80.  
  81. print pg_result($r,0,0)."<br>";
  82.  
  83.  
  84.  
  85. ?>
  86.  
  87.  
  88.  
  89.  
  90. body{
  91. font-size:20pt;
  92. margin-top:5pt;
  93. margin-bottom:5pt;
  94. color:green;
  95. }
  96. p.tekst_podkreslony{
  97. text-decoration:underline;
  98. }
  99.  
  100. ol ul{font-weight:bold;
  101. text-decoration:underline;
  102. color:blue;
  103. }
  104.  
  105. h1:first-letter{
  106. color:red;
  107. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement