var xhr = new XMLHttpRequest(); xhr.open('GET', 'file.xml', true); xhr.timeout = 2000; // time in milliseconds xhr.onload = function () { // Request finished.
確定! 回上一頁