<code class="javascript">var cmd = ["0x02,0x03,0xB4,0xB4,0x00,0x06","0x00,0x02,0x6E,0x00,0x00,0x05","0x01,0x01,0x00,0x78,0x00,0x05","0x03,0x03,0x82,0x96,0x00,0x05"];</code>
<code class="javascript">var cmd1=[0x02, 0x03, 0xB4, 0xB4, 0xFF, 0xFF,0x02, 0x03, 0xB4, 0xB4, 0x00, 0x06,0x00, 0x02, 0x6E, 0x00, 0x00, 0x05,0x01, 0x01, 0x00, 0x78, 0x00, 0x05,0x03, 0x03, 0x82, 0x96, 0x00, 0x05];</code>
<code class="javascript">var test =["0x02,0x03,0xB4,0xB4,0x00,0x06","0x00,0x02,0x6E,0x00,0x00,0x05","0x01,0x01,0x00,0x78,0x00,0x05","0x03,0x03,0x82,0x96,0x00,0x05"];</code>
<code class="javascript">var cloud = [0x02, 0x03, 0xB4, 0xB4, 0xFF, 0xFF, 0x02, 0x03, 0xB4, 0xB4, 0x00, 0x06, 0x00, 0x02, 0x6E, 0x00, 0x00, 0x05, 0x01, 0x01, 0x00, 0x78, 0x00, 0x05, 0x03, 0x03, 0x82, 0x96, 0x00, 0x05 ];</code>
程式碼如上
cmd 是透過PHP 轉換得到的16進位編碼但是JS 取到的時候已經變成了字串
想實現將cmd 變成跟cmd1 一樣的十六進位截圖藍色部分為想要的效果紅色是數據內容