-2

I want to print the circled plus in JavaScript to an HTML page.

Here is how the circled plus looks like.

I saw this solution but I can not figure out how to apply it for this symbol: HtmlSpecialChars equivalent in Javascript?

Community
  • 1
  • 1
J. Doe
  • 85
  • 7

2 Answers2

2

Demo:

document.body.textContent = '\u2295';
body { font-size: 50px }
trincot
  • 263,463
  • 30
  • 215
  • 251
1

You are looking for ⊕:

document.getElementById('js').innerHTML = '⊕'
<div>&oplus;</div>  <!-- ⊕ -->
<div id='js'></div> <!-- ⊕ -->
TimoStaudinger
  • 38,697
  • 15
  • 86
  • 91