<head>
<script type="text/javascript" src="<%=basePath%>wui/js/jquery.qrcode.js"></script>
<script type="text/javascript" src="<%=basePath%>wui/js/qrcode.js"></script>
<script>
$(function(){
var scc = toUtf8(document.getElementById("ks7").innerHTML);
$("#code").qrcode({
render: "table",
width: 370,
height:370,
text: scc
});
});
function toUtf8(str) {
var out, i, len, c;
out = "";
len = str.length;
for(i = 0; i < len; i++) {
c = str.charCodeAt(i);
if ((c >= 0x0001) && (c <= 0x007F)) {
out += str.charAt(i);
} else if (c > 0x07FF) {
out += String.fromCharCode(0xE0 | ((c >> 12) & 0x0F));
out += String.fromCharCode(0x80 | ((c >> 6) & 0x3F));
out += String.fromCharCode(0x80 | ((c >> 0) & 0x3F));
} else {
out += String.fromCharCode(0xC0 | ((c >> 6) & 0x1F));
out += String.fromCharCode(0x80 | ((c >> 0) & 0x3F));
}
}
return out;
}
</script>
</head>
<body>
<!--在此接收后台传递的qrcode的值-->
<body style=" width:100%;height:100%;">
<div id="ks7"style="display:none; width:800%;height:100%;">
<s:property value="qrcode"/>
</div>
<div style="text-align:center;">
<div id="code" style="text-align:center;border:1px solid #000;background-color:#FFFFFF; width: 400px;height:400px;padding:25% 15% 20% 25%;margin:5% 40% 25% -25%;"></div>
</div>
</body>