我從SOAP服務器獲取響應,它是一個字節數組,固定大小。如何在javascript中將字節數組轉換爲字符串
舉例來說,我得到{ rsp: { errorNumber: '1', errorMessage: { item: [Object] } } }
[ '73',
'110',
'118',
'97',
'108',
'105',
'100',
'32',
'112',
'97',
'115',
'115',
'119',
'111',
'114',
'100',
'0']
如何開啓數組的字符串時,它的JavaScript?
'array.join( '')'? – karthikr
你只是想讓該數組成爲一個字符串? '的console.log([ '73', '110', '118', '97', '108', '105', '100', '32', '112', '97', '115', '115', '119', '111', '114', '100', '0']的toString());' – brbcoding
'字符串.fromCharCode.apply(String,arr);' –