Answer the question
In order to leave comments, you need to log in
How to output data to the site?
I use the flask_socketio library, how to make the data that came to me not be displayed in a new div (the code is just below), but changed in the existing div to new ones. Here is the code itself:
socket.on('my_pos', function(msg) {
$('#log').append('<br>' + $('<div/>').text('Received #' + msg.count + ': ' + msg.data).html());
});
<div id="log"></div>
Answer the question
In order to leave comments, you need to log in
Some hellish code, meaningless and merciless.
$('#log').text('Received #' + msg.count + ': ' + msg.data);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question