Running Web Socket Client side programming

前端 未结 1 1160
失恋的感觉
失恋的感觉 2021-01-27 10:23

I just read about web sockets and written this simple client side java script. But it doesn\'t give me any output even if I run on Chrome browser and I don\'t know what is the F

相关标签:
1条回答
  • 2021-01-27 10:55

    you typoed onclcik in your input button. Other than that, your code should work fine, except as minitech mentioned in his comment, I don't think google currently has a web socket script setup for you to use. Try making your own server-side script to point to, or search for an existing 3rd party site example to play with (eg, quick google search and I found ws://echo.websocket.org which i tried your code on and it worked, other than the typo)

    0 讨论(0)
提交回复
热议问题