Add onclick property to input with JavaScript

前端 未结 4 1115
执笔经年
执笔经年 2020-12-17 09:41

I am creating a user input at one of the events:

var throwConnectBox = function() {
    chat_box = document.getElementById(\'box\');
    div = window.parent.         


        
4条回答
  •  南方客
    南方客 (楼主)
    2020-12-17 09:59

    Try this:

     input.onclick = function() { conn.send('$connect\r\n'); };
    

    Steve

提交回复
热议问题