Use of Superscript in Javascript

Posted by vishalneeraj-24503 under JavaScript category on | Points: 40 | Views : 3339
There are 2 ways of adding Superscript in any string in Javascript.
For ex:-
<script type="text/javascript">
function sup_script()
var str = "Javascript";
str = str + "<sup>TM</sup>";


var str1 = "TM";
str1 = "Javascript" + str1.sup();

With the help of <sup>text</sup> and text.sup() function we can add superscript in any string.

Comments or Responses

Posted by: t5j9033387989 on: 11/29/2013 Level:Starter | Status: [Member] | Points: 10
Nice example so intersting thanks..

Login to post response