<!DOCTYPE html>
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(function() {
if (($.browser.msie && $.browser.version <= "6.0") || !$.browser.msie) {
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>