Created
October 30, 2012 09:09
-
-
Save gitssk/3979157 to your computer and use it in GitHub Desktop.
html with websocket call
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
<script> | |
function start() { | |
var connection = new WebSocket('ws://localhost:8888/websocket'); | |
connection.onopen = function () { | |
alert('open'); | |
}; | |
} | |
</script> | |
<html> | |
<body onload="javascript:start();"> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment