通过google在线生成二维码的api在线生成二维码。 代码如下: 复制代码 代码如下: 二维码生成-www.jbxue.com <BR>function post(){ <BR>if(document.getElementById('content').value==''){alert('内容不能为空!');document.getElementById('content').focus();return false;} <BR>if(ckregdatapost()==false){return false;} <BR>} <BR> <BR>body{text-align:center;background:#f5f5f5;line-height:22px;font-size:14px;color:#888;} <BR>.newcrop{margin:10;} <BR>.er{width:700px;margin:0px auto;border:1px solid gray} <BR>span{background:#645;color:#fff} <BR>body form {text-align:center;padding: 3px 6px 3px 6px;} <BR>input.txt{color: #00008B;background-color: #ADD8E6;border: 1px inset #00008B;width: 200px;} <BR>input.btn {color: #00008B;background-color: #ADD8E6;border: 1px outset #00008B;padding: 2px 4px 2px 4px;} <BR>input.smallInput{border:1 solid black;FONT-SIZE: 9pt; FONT-STYLE: normal; FONT-VARIANT: normal; FONT-WEIGHT: normal; HEIGHT: 18px; LINE-HEIGHT: normal} <BR> $content=$_GET['content']; $width=$_GET['width']?$_GET['width']:300; $height=$_GET['height']?$_GET['height']:300; if($content){ echo "你输入的文字是: $content "; echo "你选择的宽度是: $width "; echo "你选择的高度是: $height "; echo "生成的二维码图像是: "; $wen = urlencode(mb_convert_encoding($content, 'utf-8', 'gb2312')).""; echo " 图片地址:https://chart.googleapis.com/chart?cht=qr&chld=H&chs={$width}x{$height}&chl={$wen} 复制发给你的朋友。 返回上一页"; }else{ ?> 二维码生成工具 width: 100 200 300 400 500 height: 100 200 300 400 500 输入网址或者文字: }?>