abstract:<!doctype html><html><head><meta charset="utf-8"><title>js生成二維碼</title><script type="text/javascript" src="http://static.runoob.com/asse
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>js生成二維碼</title>
<script type="text/javascript" src="http://static.runoob.com/assets/qrcode/qrcode.min.js"></script>
</head>
<body>
<script type="text/javascript">
var T = Math.round(new Date() / 1000);
var url ='https://www.baidu.com/w/q/133%263%26105925'
function Money (m){
document.getElementById("code").style="display:block;"
money = document.getElementById('money').value -0;
qr = url+"%26"+money*100+"%26"+T+"168";
document.getElementById("code").src='http://qr.liantu.com/api.php?text='+qr;
}
</script>
請輸入金額<input id="money" type="text" >
<input type="button" value="生成" onClick="Money(this)">
<img width="200" height="200" style="display:none;" src="" id="code" />
</body>
</html>
Correcting teacher:查無此人Correction time:2019-06-13 09:12:46
Teacher's summary:完成的不錯。js是終生學(xué)習(xí)語言,功能非常強(qiáng)大。繼續(xù)加油