Advertisement
Chalief

latihan ujikom

Aug 3rd, 2015
214
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.21 KB | None | 0 0
  1. <HTML>
  2. <head></head>
  3. <body >
  4. <table border=1 width=800 height=100>
  5. <tr>
  6. <td>Form
  7. </td>
  8. <td>Table
  9. </td>
  10. <td>Logo Images
  11. </td>
  12. </tr>
  13. </table>
  14.  
  15. <table border=0 width=800 height=100>
  16. <form name="input">
  17. <tr>
  18. <td colspan=3>Nama : <input type=text name=nama></td></tr>
  19. <tr><td colspan=3>Agama : <select name=agama>
  20. <script type="text/Javascript">
  21. </script>
  22. <option>Islam</option>
  23. <option>Kristen</option>
  24. <option>Katolik</option>
  25. <option>Hindu</option>
  26. <option>Budha</option>
  27. </select></td></tr>
  28. <tr><td colspan=3>Jenis Kelamin : <input type=radio name=laki>Laki Laki<input type=radio name=cewe>Perempuan</td></tr>
  29. <tr><td colspan=3>Tanggal Lahir : <select name="tgl">
  30. <script language="javascript">
  31. for (var i=1; i<=31; i++)
  32. {
  33. document.write("<option value= " +i+ ">" +i+ "</option>");
  34. }
  35. </script>
  36. </select> /
  37. <select name="bln">
  38. <script language="javascript">
  39. var bulan = new Array("Januari","Februari","Maret","April","Mei","Juni","Juli","Agustus","Septeber","Oktober","November","Desember")
  40. for(i=0; i < bulan.length; i++){
  41. document.write("<option value=" + i + ">" + bulan[i] + "</option>");
  42. }
  43. </script>
  44. </select> /
  45. <select name="thn">
  46. <script language="javascript">
  47. for (var i=1990; i<=2015; i++)
  48. {
  49. document.write("<option value=" +i+ ">" +i+ "</option>");
  50. }
  51. </script>
  52. </select></td></tr>
  53. <tr><td colspan=3>Usia :
  54. <script type="text/Javascript">
  55. function husia(){
  56. var dt = new Date();
  57. dt = dt.getTime();
  58. var dt2 = new Date(document.input.thn.value,document.input.bln.value,document.input.tgl.value);
  59. dt2 = dt2.getTime();
  60. document.input.usia.value = parseInt((dt-dt2)/(1000*60*60*24*365));
  61. }</script>
  62. <input type=text name=usia onfocus="husia()">
  63. </td></tr>
  64. <tr><td colspan=3><input type="reset" value="Clear"> <input type="submit" value="Home">
  65. </td></tr></form>
  66. <tr>
  67. <td>Created By ?
  68. </td>
  69. </tr>
  70. </table>
  71.  
  72. </body>
  73. </HTML>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement