页面的后退、刷新、前进

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>Document</title>
<script>
function back()
{
    history.go(-1);    //后退1页
}
function forward()
{
    history.go(+1); //前进1页
}
function refresh()
{
    history.go(-0);    //刷新
}
</script>
</head>
<body>
    <input type="button" value="后退" onclick="back()" />
    <input type="button" value="刷新" onclick="refresh()" />
    <input type="button" value="前进" onclick="forward()" />
</body>
</html>

 

posted @ 2013-12-29 23:08  白小虫  阅读(164)  评论(0编辑  收藏  举报