Say I have the following HTML code:
<span id="test">💊</span>
If I do document.getElementById('test').innerHTML.charAt(0) I get � back. Is there a way to get the actual glyph back?
Here's a JS fiddle showing the code in action:
💊 If I do document.getElementById('test').innerHTML.charAt(0) I get � back. Is ther" /> 💊 If I do document.getElementById('test').innerHTML.charAt(0) I get � back. Is ther" /> 💊 If I do document.getElementById('test').innerHTML.charAt(0) I get � back. Is ther"/>
Say I have the following HTML code:
<span id="test">💊</span>
If I do document.getElementById('test').innerHTML.charAt(0) I get � back. Is there a way to get the actual glyph back?
Here's a JS fiddle showing the code in action: