-
Feb 7th, 2020, 06:30 PM
#1
Thread Starter
PowerPoster
[RESOLVED] How to assign a HTML symbol value to a <span> tag
I'm trying to execute the following statement:
HTML Code:
document.getElementById("s1").innerHTML = ▶
I'm getting this error: Uncaught SyntaxError: Unexpected token '&'
The character is a Left Pointing Black Arrow. How do I assign that value?
Thanks,
-
Feb 8th, 2020, 05:56 AM
#2
Re: How to assign a HTML symbol value to a <span> tag
Have you tried wrapping the hex with single quote?
Code:
document.getElementById("s1").innerHTML = '▶';
Works for me.
-
Feb 8th, 2020, 11:45 AM
#3
Thread Starter
PowerPoster
Re: How to assign a HTML symbol value to a <span> tag
That worked dee-u....thanks! I forgot about the single quotes. I was using the double quotes!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|