TVJR/static/script.js

25 lines
565 B
JavaScript
Executable File

$(function () {
var socket = io();
socket.on('chat message', function(msg){
//$('#messages').append($('<li>').text(msg));
});
});
$('#send').click(function(){
var data = {zone:$("#zone").val(),
ListeCom : new Array()};
data.ListeCom.push({
IDPub:-1,
html:($(this).children(".com")[0]).value,
level:($(this).children(".lvl")[0]).value
});
socket.emit('Communication', JSON.stringify(data));
//$('#m').val('');
return false;
});