javascript - Read complete data from stream from onMessage -


How to read event.data from a web site entirely using javascript ?

  On Message: Function (Event) {var msg = event.data; Warning (msg); }   

In the above code, variable msg shows only partial data How to obtain complete data from websicet server?

event.data contains complete information; It depends only on your output how much you will see. A warning box only contains a special number of characters, because more characters do not fit in the warning box only. Warning ing is not a good practice to display large data.

A more convenient way to save the length and to check that, for example:

  On Message: Function (Event) {var msg = event.data; Warning (msg.length); }   

The length should be just the right length, that is the length of the characters you sent.

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -