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