<!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
</head>
<body>
用js实现网页中打印、刷新、关闭、前进、后退、返回等操作,js代码如下,直接调用即可:
[<a href="#" οnclick="window.opener=null;window.open('','_self');window.close();" >关闭</a >]
[<a href="javascript:window.print()" target="_self">打印</a>]
[<a href='javascript:history.go(-1)'>返回/后退</a>]
[<a href='javascript:history.go(1)'>前进</a>]
[<a href='javascript:history.go(0)'>刷新</a>]
</body>
</html>