62,266
社区成员
发帖
与我相关
我的任务
分享
<!DOCTYPE html>
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(function() {
if ( $.browser.msie && $.browser.version <= "9.0") {
alert("invalid browser! it will be shutdown after 5s!");
var count = 5;
var decreasement = function() {
if (count > 0) {
$("#msg").html("<h1>" + count + "</h1>");
count --;
setTimeout(decreasement, 1000);
}
else {
window.close();
}
};
decreasement();
}
});
</script>
</head>
<body>
<div id="msg"></div>
</body>
</html>