I want to know if it’s possible to console log strings from a html element’s method? For example in an html document with: I was able to console log numbers but not strings or booleans. Is is possible? Answer Yes of course try this code. The onblur attribute fires the javascript code at the moment that the element loses focus