web standard/jquery2011. 7. 18. 15:35
<!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" lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<title>Print Portion Example</title>
<style type="text/css">
* {margin:0; padding:0; }
img {border:none;vertical-align:top;}
@media print {
    body div {display:none;}
    body .printable {display:block;}
}
</style>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
</head>
<body>
<div><img src="images/img_print110718_01.jpg" width="661" height="40" alt="" /></div>
<div id="printArea"><img src="images/img_print110718_02.jpg" width="661" height="320" alt="" /></div>
<div><img src="images/img_print110718_03.jpg" width="661" height="70" usemap="#link1" alt="" /></div>
<map id="link1" name="link1">
    <area shape="rect" href="#" onclick="divPrint();" coords="275,1,417,39" alt="" />
</map>
<script type="text/javascript">
function divPrint() {
// Some logic determines which div should be printed...
// This example uses printArea.
$("#printArea").addClass("printable");
window.print();
}
</script>
</body>
</html>

'web standard > jquery' 카테고리의 다른 글

이미지 슬라이드  (0) 2011.11.08
탭메뉴+prev, next  (0) 2011.08.08
레이어팝업 브라우저 가운데 띄우기  (0) 2011.07.15
탭메뉴  (1) 2011.06.16
이미지롤오버  (0) 2011.04.06
Posted by 수라