<html>
<head>
<script type="text/JavaScript">
function ShowBack()
{
location="http://www.google.com/"
}
</script>
</head>
<body>
This is a smiple application!
<script type="text/JavaScript">
alert("这里是会运行的");
setTimeout(ShowBack,2000);
</script>
</body>
</html>
<head>
<script type="text/JavaScript">
function ShowBack()
{
location="http://www.google.com/"
}
</script>
</head>
<body>
This is a smiple application!
<script type="text/JavaScript">
alert("这里是会运行的");
setTimeout(ShowBack,2000);
</script>
</body>
</html>
<head>
<script type="text/JavaScript">
function ShowBack()
{
location.replace="http://www.google.com/"
}
</script>
</head>
<body>
This is a smiple application!
<script type="text/JavaScript">
alert("这里是会运行的");
setTimeout("ShowBack()",2000);
</script>
</body>
</html>
<body onload=test()>
This is a smiple application!
<script type="text/JavaScript">
function test(){
alert("这里是会运行的");
setTimeout("ShowBack()",2000);
}
</script>
</body>
<head>
<script type="text/JavaScript">
function ShowBack()
{
location.href="http://www.google.com/"//replace换成这句href
}
</script>
</head>
<body>
This is a smiple application!
<script type="text/JavaScript">
alert("这里是会运行的");
setTimeout(ShowBack,2000);
</script>
</body>
</html>