Guest User

Untitled

a guest
Jan 6th, 2018
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.27 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3.  
  4. <head>
  5. <meta charset="utf-8">
  6. <base target="_top">
  7.  
  8. <style>
  9. #alt {
  10. margin: auto;
  11. border: 2px dashed #1a273a;
  12. width: 500px;
  13. height: 300px;
  14. background-color: #2c3e5b;
  15. overflow-y: visible;
  16. position: relative;
  17. }
  18.  
  19. h3,
  20. h4 {
  21. display: inline;
  22. color: dimgray;
  23. }
  24.  
  25. #datetime {
  26. margin: auto;
  27. width: 300px;
  28. height: 50px;
  29. }
  30.  
  31. #mytemp {
  32. width: 300px;
  33. height: 50px;
  34. margin: auto;
  35. font-size: 20px;
  36. background: none;
  37. border: none;
  38. width: 100%;
  39. background-color: #c9c9c9;
  40. color: #3f3f3f;
  41. margin-right: 1px;
  42. }
  43.  
  44. #button {
  45. width: 100px;
  46. height: 30px;
  47. background: #c9c9c9;
  48. position: absolute;
  49. bottom: 0;
  50. right: 0;
  51. text-decoration: none;
  52. text-align: center;
  53. }
  54. </style>
  55. <script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js">
  56. </script>
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64. </head>
  65.  
  66. <body>
  67. <div id="alt">
  68. <select class="submenu" id='datetime' onChange=setval();>
  69. <option disabled value="select" selected>Select</option>
  70. </select>
  71. <div>
  72. <div id="mytemp"></div>
  73. </div>
  74. <button id="button" type="button">Click Me!</button>
  75. </div>
  76. <script>
  77. google.script.run.withSuccessHandler(kurci).menu();
  78.  
  79. function kurci(newShit) {
  80. var html = '';
  81.  
  82. for (var i = 0; i < newShit.length; i++) {
  83.  
  84. html += "<option value='" + newShit[i][1] + newShit[i][2] + "'>" + newShit[i][0] + "</option>";
  85.  
  86. }
  87.  
  88.  
  89. $("#datetime").html(html);
  90.  
  91. }
  92.  
  93. function setval() {
  94.  
  95. var temp = $('#datetime').val();
  96. $('#mytemp').html(temp);
  97. }
  98.  
  99. $("#button").click(function() {
  100. console.log("Hi!"); // ispisuva Hi vo konzola
  101. });
  102. </script>
  103.  
  104.  
  105. </body>
  106.  
  107. </html>
Advertisement
Add Comment
Please, Sign In to add comment