Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8">
- <base target="_top">
- <style>
- #alt {
- margin: auto;
- border: 2px dashed #1a273a;
- width: 500px;
- height: 300px;
- background-color: #2c3e5b;
- overflow-y: visible;
- position: relative;
- }
- h3,
- h4 {
- display: inline;
- color: dimgray;
- }
- #datetime {
- margin: auto;
- width: 300px;
- height: 50px;
- }
- #mytemp {
- width: 300px;
- height: 50px;
- margin: auto;
- font-size: 20px;
- background: none;
- border: none;
- width: 100%;
- background-color: #c9c9c9;
- color: #3f3f3f;
- margin-right: 1px;
- }
- #button {
- width: 100px;
- height: 30px;
- background: #c9c9c9;
- position: absolute;
- bottom: 0;
- right: 0;
- text-decoration: none;
- text-align: center;
- }
- </style>
- <script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js">
- </script>
- </head>
- <body>
- <div id="alt">
- <select class="submenu" id='datetime' onChange=setval();>
- <option disabled value="select" selected>Select</option>
- </select>
- <div>
- <div id="mytemp"></div>
- </div>
- <button id="button" type="button">Click Me!</button>
- </div>
- <script>
- google.script.run.withSuccessHandler(kurci).menu();
- function kurci(newShit) {
- var html = '';
- for (var i = 0; i < newShit.length; i++) {
- html += "<option value='" + newShit[i][1] + newShit[i][2] + "'>" + newShit[i][0] + "</option>";
- }
- $("#datetime").html(html);
- }
- function setval() {
- var temp = $('#datetime').val();
- $('#mytemp').html(temp);
- }
- $("#button").click(function() {
- console.log("Hi!"); // ispisuva Hi vo konzola
- });
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment