input如何屏蔽中文输入法

1、iem-mode:disabled

兼容性差,只兼容ie,firefox

2、 type="password" 

<input nz-input type="password"  readonly onfocus="this.removeAttribute('readonly');" (keyup)="qrCodeKeyup($event)" [(ngModel)]="qrCodeForm.plan_guid" name="plan_guid"  placeholder="条码信息"/>
                <input nz-input  readonly onfocus="this.removeAttribute('readonly');"  [(ngModel)]="qrCodeForm.plan_guid" name="plan_guid"  placeholder="条码信息" 
                style="position: absolute;
                left: 0;
                top: -7px;
                pointer-events: none;" />

pointer-events: none; // 停止所有事件

上层光标不显示问题待解决

猜你喜欢

转载自blog.csdn.net/sou_vyp/article/details/100019973