2
1
mirror of https://github.com/s00500/nodeMessageBoard.git synced 2024-11-16 10:10:53 +00:00
nodeMessageBoard/clear.html

64 lines
1.3 KiB
HTML
Raw Normal View History

2016-03-15 12:21:33 +00:00
<!DOCTYPE html>
<meta charset="UTF-8">
<html>
<head>
<title>Clear Board</title>
<link rel='stylesheet' href='sprite/emoji.css' >
<link rel="stylesheet" href="/css/bootstrap.min.css" />
<script src="/js/jquery-1.12.1.min"></script>
<script src="/js/jquery-ui.js"></script>
<script src="/socket.io/socket.io.js"></script>
<script>
var iosocket;
function initSocketIO()
{
iosocket = io.connect();
iosocket.on('onconnection', function() {
iosocket.on('debugMessage', function(message) {
alert(message);
});
});
}
window.onload = function() {
initSocketIO();
};
$(document).ready(function() {
$('#clear').click(function() {
var number = $('#number').val();
iosocket.emit('clear',number);
2016-03-15 14:19:33 +00:00
alert("cleared");
2016-03-15 12:21:33 +00:00
});
$('#refresh').click(function() {
iosocket.emit('refreshClients');
});
});
</script>
</head>
<body>
<div style="text-align:center;" >
<div id="wrap">
<div id="btnHolder">
<h2>Functions</h2>
<input type="number" id="number" value="1" min="1"/><label for="number">Number</label><br>
<input type="button" id="clear" value="clear"/>
<br>
<input type="button" id="refresh" value="refresh"/>
<div id="debugOut"> </div>
</div>
</div>
</body>
</html>