Advertisement
Guest User

Untitled

a guest
Aug 24th, 2016
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. <body>
  2. <h3>Climate Temperature Toolbox</h3>
  3. <input type="button" value="start" id="start" />
  4. <input type="button" value="stop" id="stop" />
  5. Send Weather Data for your home city:
  6. <br /><br />
  7. City: <input type="text" id="home-city" />
  8. Celsius: <input type="text" id="home-temperature" />
  9. <input type="button" value="send" id="send" />
  10. <br />
  11. Weather Data from other cities:
  12. <ul id="cities">
  13. </ul>
  14. <script>
  15.  
  16. //self executing function here
  17. (function() {
  18. // your page initialization code here
  19. // the DOM will be available here
  20. document.getElementById("start").addEventListener("click", startEventStream);
  21. document.getElementById("send").addEventListener("click", sendHomeTemperature);
  22. document.getElementById("stop").addEventListener("click", stopEventStream);
  23. })();
  24.  
  25. function stopEventStream() {
  26. console.log("stopEventStream()");
  27. window.evntSrc.close();
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement