How can I show a euro or other HTML entity in JavaScript alert windows?

JavascriptWeb DevelopmentFront End Technology

Yes, use the Unicode Character of Euro i.e. “20AC” to print it.

Example

You can try to run the following code to print the Euro character −

Live Demo

<!DOCTYPE html>
<html>
   <body>
      <script>
         alert("\u20AC");
         document.write("\u20AC");
      </script>
      <p>Printing the Euro sign above.</p>
   </body>
</html>
raja
Published on 03-Feb-2018 15:42:51
Advertisements