<html>
<head>
<title>二维码</title>
<meta name="decorator" content="default"/>
<style>
img {box-shadow:0 0 5px #ccc; margin:3px; width:200px}
.mybox {box-shadow:0 0 5px #ccc; margin:3px; width:200px;float:left; display:inline;padding: 10px;}
</style>
<script src="${ctxStatic}/jquery/jquery-1.8.3.min.js" type="text/javascript"></script>
<script src="${ctxStatic}/jquery/jquery.jqprint-0.3.js" type="text/javascript"></script>
<script src="${ctxStatic}/jquery/jquery.print-preview.js" type="text/javascript"></script>
<script src="${ctxStatic}/jquery/jquery.qrcode.min.js" type="text/javascript"></script>
</head>
<body>
<div id="print-area">
<c:forEach items="${list}" var="p" varStatus="index">
<div id="qrcode${index.index}" class="mybox"><input name="qrcode${index.index}" type="hidden" value="${p}" /></div>
</c:forEach>
</div>
<script type="text/javascript">
$(document).ready(function() {
var qrcodes=$("input[name^='qrcode']");
if(qrcodes.length>0){
qrcodes.each(function(index,comment){
$('#qrcode'+index+'').qrcode({
render: "canvas",
width: 200,
height: 200,
//text: "http://localhost:8080/a/yuqian/yqRukudan/printerweima?materialNo="+$("input[name^='qrcode"+index+"']").val()
text: "http“
});
})
}
});
</script>
</body>
</html>