So I have some very simple code, but its perplexing me:
<textarea loc="'this is a string'" onclick="console.log(this.loc)"></textarea>
(you can view it here)
My code is supposed to:
- Give the textarea an attribute of loc ('this is a string')
- Then, onclick log the loc attribute by accessing itself, then the newly made attribute
This odd glitch is confusing me, and solving this is vital to finishing a program I've been working on. Its so simple, yet so confusing. Any ideas of how to log the textareas location to the console?
