1
我在JavaScript中有一個方法,做了如下因素:XMLHttpRequest的錯誤
var X = new XMLHttpRequest(); X.open('GET',U,false); X.setRequestHeader('Content-Type','text/html'); X.send('');
where U = path to a file...example: xyz/abc.txt.
它工作正常,在Firefox,但打開它的鍍鉻給了我以下錯誤:
Uncaught Error: NETWORK_ERR: XMLHttpRequest Exception 101
它說錯誤X.send('')。我試過
X.send(null); //did not work
X.send() // did not work.
任何幫助,這是非常讚賞。謝謝!