日期:2014-05-17 浏览次数:20498 次
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<link id='linkcss' href="test.css" rel="stylesheet" type="text/css" />
<body onload = "close_page()">
<div id="rt"></div>
<script>
var div = document.getElementById("rt");
var seconds = 100;
function close_page(){
div.innerHTML = seconds;
div.style.width = seconds + "%";
if(--seconds == 0){
window.close();
}else{
setTimeout(close_page, 1000);
}
}
function change(linkurl){
document.getElementById("linkcss").href=linkurl;
}
</script>
<input type='button' onclick='change("test1.css")' value='change' >
<input type='button' onclick='change("test.css")' value='changeback' >
</body>
</html>