|
管理员好,我想在流程表单中放一个根据表单内容生成的二维码。
在表单afterload事件中,插入下面的代码以后,预览运行的时候,跳出来说对象"code2qr"未定义,是我引用对象的方式不对吗?
new Element("script", {
"type": "text/javascript",
"src": "//apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"
}).inject($(document.head));
new Element("script", {
"type": "text/javascript",
"src": "//apps.bdimg.com/libs/jquery-qrcode/1.0.0/jquery.qrcode.min.js"
}).inject($(document.head));
new Element("div", {
"id": "code2qr",
}).inject($(document.body));
try{
$("#code2qr").qrcode("www.baidu.com");
} catch(err){
window.alert(err);
}
|
|