  }else{
        //do something
    }
    ws.onmessage = function (event) {
        var data = event.data;
        data = eval('(' + data + ')');
        if ('systemMsg' in data) {
            var line = document.createElement('div');
            line.className = 'sysMsg';
            line.innerHTML = data.systemMsg;
            document.getElementById('msg').appendChild(line);
        } else if ('onlineNums' in data) {
            document.getElementById('online-nums').innerHTML = data.onlineNums;
        