Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <body>
- <h3>Climate Temperature Toolbox</h3>
- <input type="button" value="start" id="start" />
- <input type="button" value="stop" id="stop" />
- Send Weather Data for your home city:
- <br /><br />
- City: <input type="text" id="home-city" />
- Celsius: <input type="text" id="home-temperature" />
- <input type="button" value="send" id="send" />
- <br />
- Weather Data from other cities:
- <ul id="cities">
- </ul>
- <script>
- //self executing function here
- (function() {
- // your page initialization code here
- // the DOM will be available here
- document.getElementById("start").addEventListener("click", startEventStream);
- document.getElementById("send").addEventListener("click", sendHomeTemperature);
- document.getElementById("stop").addEventListener("click", stopEventStream);
- })();
- function stopEventStream() {
- console.log("stopEventStream()");
- window.evntSrc.close();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement