- document.getElementById("#input");
- var input : HTMLInputElement = document.getElementById("#input");
Cannot convert 'HTMLElement' to 'HTMLInputElement': Type 'HTMLElement' is missing property 'setSelectionRange' from type 'HTMLInputElement'
そこで、次のように < > を使ってキャストすれば怒られなくなります。
- var input : HTMLInputElement = <HTMLInputElement>document.getElementById("#input");
0 件のコメント:
コメントを投稿