innerHTML>>它不起作用。但警告和功能外>>它的工作
scanner.addListener('scan', function (content) {
//console.log(content); //It's work
//alert(content); //It's work
this.text2.innerHTML=content; //It's not working.
this.setText(content); //send to other functions >>It's not working.
});
答案 0 :(得分:0)
试试这个:
scanner.addListener('scan', function (content) {
//console.log(content); //It's work
//alert(content); //It's work
this.text2 = content; // <--- Change to this
this.setText(content); //send to other functions >>It's not working.
});
关于你的元素:
<some-element>{{text2}}</some-element>