Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

urgent - help required on java script

843840Nov 22 2007 — edited Nov 22 2007
Hello,

I have javascript with an alert box popping up, something like below:
alert('H2O is water')

But here I want to make 2 to appear as a subscript. I know using html we use <sub></sub> tags.
I am not aware of how to use these htnl tags within a javascript.
Can someone help me please, this is little urgent?

OR

Is there way wherein, I can define a string constant(with html embedded) outside my javascript, and later on pass it onto alert box ??

Many thanks !
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 20 2007
Added on Nov 22 2007
4 comments
156 views