test(){
// let aa = this.$refs.input1.blur();
// this.$nextTick((x)=>{ //正确写法
// // this.$refs.inputs.focus();
// // console.log(x)
// // this.$refs.inp[0].$refs.input.focus();
// },3000)
// $api.dom('input').focus();
// this.$refs.Inp.focus();
// aa.focus();
// $("input").trigger("click").focus();
$api.dom('input').addEventListener("touchstart", function(e){
console.log("aaaaaaa");
$("input").trigger("click").focus();
})
let theEvent = document.createEvent("Events");
theEvent.initEvent("touchstart", true, true);
$api.dom('input').dispatchEvent(theEvent);
console.log(88888)
console.log(this.focusVal)
},
如图,移动端H5界面打开后,如何自动调用软键盘,试了很多方法,发现只能聚焦,并不能调起软键盘。。。。
是不是h5没办法做到?
大佬们,帮忙看下
如果觉得《移动端h5唤起键盘_移动端H5界面打开后 如何自动调用软键盘》对你有帮助,请点赞、收藏,并留下你的观点哦!