yicheng wang

Results 3 comments of yicheng wang

Should be aware to put $('#m').val() below body or put the selector inside document.ready

#arekan127 not put above,should be put below... ``` Send var socket = io(); $('form').submit(function(){ socket.emit('chat message', $('#m').val()); $('#m').val(''); return false; }); socket.on('chat message', function(msg){ $('#messages').append($('').text(msg)); }); ```

Yes,close the syntax highlighting will fix this issue.