console
load();
<div id="main">
<div id="header">
<div style="position:relative;top:+20px;left:0px;">
<g:plusone size="medium">
</g:plusone>
</div>
<p id="mp1">
二维码扫描
</p>
</div>
<div id="mainbody">
<table class="tsel" border="0" width="100%">
<tr>
<td valign="top" align="center" width="50%">
<table class="tsel" border="0">
<tr>
<td>
<div class="selector" onclick="setwebcam()"
>相机</div>
</td>
<td>
<div class="selector" id="qrimg" onclick="setimg()" >
图库
</div>
</td>
</tr>
<tr>
<td colspan="2" align="center">
<div id="outdiv">
</div>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="3" align="center">
<div id="result">
</div>
</td>
</tr>
</table>
</div>
</div>
<canvas id="qr-canvas" width="800" height="600">
</canvas>
body {
width: 100%;
text-align: center;
}
img {
border: 0;
}
#main {
margin: 15px auto;
background: white;
overflow: auto;
width: 100%;
}
#header {
background: white;
margin-bottom: 15px;
}
#mainbody {
background: white;
width: 100%;
display: none;
}
#footer {
background: white;
}
#v {
width: 320px;
height: 240px;
}
#qr-canvas {
display: none;
}
#qrfile {
width: 320px;
height: 240px;
}
#mp1 {
text-align: center;
font-size: 35px;
}
#imghelp {
position: relative;
left: 0px;
top: -160px;
z-index: 100;
font: 18px arial, sans-serif;
background: #f0f0f0;
margin-left: 35px;
margin-right: 35px;
padding-top: 10px;
padding-bottom: 10px;
border-radius: 20px;
}
.selector {
margin: 0;
border: 3px solid;
padding: 0;
cursor: pointer;
padding: 15px;
}
#outdiv {
width: 320px;
height: 240px;
border: solid;
border-width: 3px 3px 3px 3px;
}
#result {
border: solid;
border-width: 1px 1px 1px 1px;
padding: 20px;
width: 70%;
}
ul {
margin-bottom: 0;
margin-right: 40px;
}
li {
display: inline;
padding-right: 0.5em;
padding-left: 0.5em;
font-weight: bold;
border-right: 1px solid #333333;
}
li a {
text-decoration: none;
color: black;
}
#footer a {
color: black;
}
.tsel {
padding: 0;
}