0

我们可以在我们的网页中显示浏览器状态栏的内容吗?就像我上传文件时,它会显示“发送请求”然后“上传 5%”等状态。我们可以直接在网页上显示吗?

4

2 回答 2

1

Yep, you can do it by

window.status

command in javascript.

Note: The status property does not work in the default configuration of IE, Firefox, Chrome, or Safari. To allow scripts to change the text of the status, the user must set the dom.disable_window_status_change preference to false in the about:config screen. (or in Firefox: "Tools - Options - Content -Enable JavaScript / Advanced - Allow scripts to change status bar text").

于 2013-06-06T13:56:45.300 回答
0

我认为你最好的选择是:

window.status

...在javascript中。但显然大多数浏览器不支持这一点。

执行以下操作:

var element = document.getElementById('someelement');
setInterval(function() {
    element.innerHTML = window.status;
}, 50);

上传文件时,完成后清除间隔。

于 2013-06-06T13:51:45.213 回答