Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7428187
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T08:42:18+00:00 2026-05-29T08:42:18+00:00

I am trying to show up some HTML Special Chars like ☚ and I

  • 0

I am trying to show up some HTML Special Chars like ☚ and I want that, when click it, it will display it’s code on a textarea.

I am trying something like this:

insertHTMLCode = function(code){
    var currentText = document.getElementById("textBox"); 
    var codeWithPadding = " " + code + " "; 

    currentText.value += codeWithPadding;
    currentText.focus(); 
}

However it always gets the symbol itself on the textarea instead the code (like &#9658)?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T08:42:18+00:00Added an answer on May 29, 2026 at 8:42 am

    You can use charCodeAt to get the numeric value of a character, and from there, you can generate the entity code:

    var codeWithPadding = ' &#' + code.charCodeAt(0).toString(10) + '; ';
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to show some random images in a div. My HTML code
I'm trying to show programmers that some captchas are too weak, and i'm breaking
I am trying to generate some HTML code to list some images for a
Greetings! I've been trying to display some HTML with Java using JEditorPane . But
I am trying to show / hide some HTML using the ng-show and ng-hide
I am trying to show some page that automatically redirect to another page, when
I am trying to display some html embedding a SWF object using javascript. The
I created a html page where I want to show some charts. For every
I'm trying to show some html in a facebook tab page without success.... I'm
I'm trying to show some text between html tags, I'm using @HTML.Raw method to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.