嗨Html5开发人员和HTML4开发人员......
我想知道是否有任何方法支持IE8及以上版本的html5的window.fileReader API.
代码如下:
if(window.fileReader){
alert("supported"); // in html5 works and fires alert but not in IE8
}
Run Code Online (Sandbox Code Playgroud)
实际上,我想在提交之前阅读文件的内容.
等待回复..
我有执行的 javascript 函数,执行后我想等待 2 秒。在 Javascript 中是否可能。
我的问题不同。我想在函数执行或完成执行后等待,而不是等到函数执行为止。
JavaScript 函数
function ajax_closeCall(onDone) {
// alert("Close Call invoked.");
closeCall_onDone = onDone;
var closeCallUrl = soapUrl + "?action=closeCall&parentSessionId=" + parentSessionId;
closeCall_http_request = getNewHttpRequest('text/plain');
closeCall_http_request.onreadystatechange = callback_ajax_closeCall;
// http_request.open("POST", soapUrl, true);
closeCall_http_request.open("GET", closeCallUrl, true);
closeCall_http_request.send(null);
}
function callback_ajax_closeCall() {
if (closeCall_http_request.readyState != 4) {
return;
}
if (closeCall_http_request.status == 200) {
if (closeCall_onDone) {
closeCall_onDone();
}
stopMonitorCallState();
ajax_getCallState();
} else {
// there was a problem with the request,
// for example the …Run Code Online (Sandbox Code Playgroud)