html5 websocket

  <style>
            #websockets-message {
              text-align: center;
              padding: 0px;
            }
            #ws-left {
              float: left;
              width: 490px;
              padding-right: 10px
            }
            #ws-left h4 {
              margin: 10px 0 0 0;
            }
            #ws-right {
              float: left;
              width: 300px;
             /* border-left: solid 1px #9a9ab3;*/
              padding-left: 20px;
            }
            #wsConsoleLog {
              background-color: white;
              border: solid 1px #999;
              border-top-color: #ccc;
              border-left-color: #ccc;
              padding: 5px;
              width: 290px;
              height: 175px;
              overflow-y: auto;
            }
            #wsConsoleLog p:first-of-type {
              margin: 0 0;
            }
            #wsConsoleLog p {
              margin: 0.5em 0;
              font-size: 12px;
            }
            #ws-left input[type='text'] {
              width: 370px;
            }
            #wsSecureCb {
              position: relative;
              top: 2px;
            }
            #wsSecureCbLabel {
              position: relative;
              left: -10px;
            }
            #ws-left button,
            #ws-right button {
              margin-top: 5px;
              font-size: 14px;
            }
            #ws-config-config, #ws-config-message {
              margin-top: 15px;
            }
            #ws-right button {
              font-size: 14px;
              margin-top: 3px;
            }
            #ws-powered {
              text-align: center;
              padding-top: 15px;
              clear: both;
            }
            #ws-powered a {
              border: 0
            }
            #wsKaazingLogo {
              position: relative;
              top: 4px;
              left: 2px;
              border: 0;
            }
          </style>
 
 <div id="ws-config-location">
                <h4>Location:</h4>
                <input type="text" id="wsUri" disabled />
                <br>
                <input type="checkbox" id="wsSecureCb" οnclick="wsToggleTls();" disabled />
                <label id="wsSecureCbLabel" for="wsSecureCb">Use secure WebSocket (TLS/SSL)</label>
                <br>
                <button id="wsConnectBut" disabled>Connect</button>
                <button id="wsDisconnectBut" disabled>Disconnect</button>
              </div>
              <div id="ws-config-message">
                <h4>Message:</h4>
                <input  type="text" id="wsMessage" value="Hello, WebSocket" disabled />
                <button id="wsSendBut" disabled>Send</button>
              </div>
            </div>
            <div id="ws-right">
              <div id="ws-log">
                <strong>Output:</strong>
                <div id="wsConsoleLog"></div>
                <button id="wsClearLogBut">Clear log</button>
              </div>
            </div>
 
          </section>
          <script src="src/websocket/websocket.js" defer></script>
        </div>

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值