What do you want to save?
Add Code snippet
New code examples
-
TypeScript 2021-10-17 13:46:05
property "'element'" does not exist on type 'htmlelement'.ts(2339)
document.getElementById() returns the type HTMLElement which does not contain a value property. The subtype HTMLInputElement does however contain the value property. So a solution is to cast the result of getElementById() to HTMLInputElement like this: ... Add solution
Best helpers
Deedee
+5
Phil Lello
+5
Anmol
+5
Jerry W.
+5
Ann Shaw
+5
Alex Kazan
+5
TheShade
+5
Ila46
+5
Jkdev
+5
Gogehat
+5
Ian Elliott
+5
Zipirovich
+5