<body>

kenshou

天空没有飞过的痕迹,但我已经努力飞过……

« Home | Next » | Next » | Next » | Next » | Next » | Next » | Next » | Next » | Next » | Next »

打印图片

打印图片,需要传入图片参数

Technorati 标签:

<!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=gbk" />
<title>打印优惠券</title>
</head>
<body onload="javascirpt:window.print();window.close()">
<div id="imgDiv"/>
<script>
    var url=window.location.href;
    var img=url.split("?")[1];
//alert(img);
    document.getElementById("imgDiv").innerHTML='<img src="'+img+'"/>';
</script>
</body>
</html>

标签:

leave a response