<input type="text" name="QRcode" id="QRcode" autocomplete="off" placeholder="扫描设备二维码" class="layui-input" lay-verify="required">
2.在js中写上功能:
$("#QRcode").focus(function() {
$('#QRcode').attr('readonly','readonly');
setTimeout(function() {
$('#QRcode').removeAttr('readonly');
}, 200)
});