Advertisement
Dr_U

inputBuku

Dec 20th, 2021
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.81 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4.  
  5. <meta charset="UTF-8">
  6. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  7. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  8. <title>Input Buku</title>
  9. <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
  10. <script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
  11. <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
  12. <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
  13. <style type="text/css">
  14. .label{
  15. display: block;
  16. font-size: small;
  17. margin-top: 5px;
  18. }.error{font-size: small;color:rgb(255, 0, 0);}
  19.  
  20. body{
  21.  
  22. width: fit-content;
  23. text-align: center;
  24. margin: auto;
  25. background-image: url(fang-wei-lin-H1IRUS1vEFA-unsplash.jpg);
  26. background-size: cover;
  27. background-position: center;
  28. background-repeat: no-repeat;
  29. }
  30.  
  31. .content{
  32. position: relative;
  33.  
  34. width: 510px;
  35. height: fit-content;
  36.  
  37. margin: auto;
  38. margin-top: 15%;
  39. background: #FFFFFF;
  40. border: 1px solid #ffffff;
  41. box-shadow: 10px 10px 10px rgba(47, 47, 47, 0.25);
  42. border-radius: 40px;
  43. filter: opacity(90%);
  44. }
  45. </style>
  46. </head>
  47. <body>
  48. <div class="content">
  49.  
  50. <h1>Form Buku Baru </h1>
  51. <br>
  52. <p>Judul Buku Baru</p>
  53. <input type="text" id = "txtbukubaru" />
  54. <p>Daftar Judul Buku </p>
  55. <select name="daftarbook" id="semuabuku" >
  56. <option value="">Pilih Judul</option>
  57. </select>
  58. <p style="padding-top: 3%;">
  59. <input type="button" id="btntambah" value="Tambah Buku" >
  60. </p>
  61.  
  62. <script>
  63. $('#btntambah').click(function(){
  64.  
  65. var bukubaru = $('#txtbukubaru').val();
  66.  
  67. $('#semuabuku').append(new Option(bukubaru, bukubaru));
  68.  
  69.  
  70. })
  71. </script>
  72. </div>
  73. </body>
  74. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement