fetch('http://tieba.baidu.com')
.then(res=> res.blob())
.then(blob => {
var reader = new FileReader();
reader.onload = function(e) {
var text = reader.result;
console.log(text)
}
reader.readAsText(blob, 'GBK')
})
参考:https://segmentfault.com/q/1010000004338890/