问答详情
源自:5-8 WebSocket客户端JS脚本的实现

Uncaught ReferenceError: send is not defined at HTMLInputElement.onclick (websocket.html:44)

<input type="button" value="发送WebSocket请求消息" onClick = "send(this.form.message.value)"/>

提问者:慕圣7541552 2018-07-15 15:37

个回答

  • 幕布斯4113933
    2018-07-22 20:52:58

    send is not defined at HTMLInputElement.onclick


    JAVASCRIPT 裡面沒有閉包

    <script type="text/javascript" src="lib.js">
    <script type="text/javascript" src="lib.js"></script>