XMLHttpRequest.overrideMimeType
當(dāng)前位置:點(diǎn)晴教程→知識(shí)管理交流
→『 技術(shù)文檔交流 』
XMLHttpRequest 的 一個(gè) 這個(gè)樣例指定 Content-Type 為“text/plain",為接受的數(shù)據(jù)重寫 ContentType 備注: 如果服務(wù)器沒(méi)有指定一個(gè) // Interpret the received data as plain text req = new XMLHttpRequest(); req.overrideMimeType("text/plain"); req.addEventListener("load", callback, false); req.open("get", url); req.send(); 該文章在 2023/7/17 8:56:33 編輯過(guò) |
相關(guān)文章
正在查詢... |