<!doctype html>
|
<html>
|
<head>
|
<meta charset="utf-8">
|
<title>jQuery打印插件jqprint</title>
|
<script src="jquery-1.4.4.min.js"></script>
|
<!--如果您使用的是高版本jQuery调用下面jQuery迁移辅助插件即可-->
|
<!-- < scriptsrc = "jquery-migrate-1.2.1.min.js" ></script>-->
|
<script src="jquery.jqprint-0.3.js"></script>
|
<script>
|
function print() {
|
$("#content").jqprint();
|
}
|
</script>
|
</head>
|
|
<body>
|
<div id="content">
|
<h1 style="text-align: center">www.w3h5.com 前端资源网</h1>
|
</div>
|
<input type="button" onclick="print()" value="打印"/>
|
</body>
|
</html>
|