Which code segment should you use?

You develop an HTML5 webpage. You have the following HTML markup:

You also have the following JavaScript code:

You need to post messages by using the HTML5 WebSocket API.
Which code segment should you use?
A. socket onmessage($(-#message").val());
B. socket.send($("#message").val());
C. var msg = $("#message").val();$.post(socket. function (msg) {…});
D. var msg = $("#message").val();$.post(socket.onmessage, function (msg) {…});

microsoft-exams

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.