Created
September 29, 2013 15:34
-
-
Save pk11/6753488 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Demo</title> | |
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"/> | |
</head> | |
<body> | |
<script data-model="rest"> | |
var Server = function() { this.name = ''; }; | |
</script> | |
<script data-model="push"> | |
var Updates = function() { this.h = this.m = this.s = this.d = this.M = this.y = ''; }; | |
</script> | |
<script data-type="Server" data-instance="server" data-url="data/name"></script> | |
<script data-type="Updates" data-instance="updates" data-url="push/time"></script> | |
<output class="time">Time: </output><output class="time">#{updates.h}:#{updates.m}:#{updates.s}</output><br> | |
<output class="time">Date: </output><output class="time">#{updates.y}-#{updates.M}-#{updates.d}</output><br> | |
<span id="output">Name: #{server.name}</span> | |
<input size="24" id="name" data-value="#{server.name}"/> | |
<button onclick="#{server.$put()}" id="set">Set</button> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment