-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
  • 317,000
  • 35
  • 244
  • 286
1

You are looking for ⊕:

document.getElementById('js').innerHTML = '⊕'
<div>&oplus;</div>  <!-- ⊕ -->
<div id='js'></div> <!-- ⊕ -->
TimoStaudinger
  • 41,396
  • 16
  • 88
  • 94