Latest

recent

JavaScript sub() Method

Definition and Usage

The sub() method is used to display a string as subscript.

Syntax

stringObject.sub()


Example

In this example "Hello world!" will be displayed in subscript:

<script type="text/javascript">
var str="Hello world!";
document.write(str.sub());
</script>
JavaScript sub() Method Reviewed by 1000sourcecodes on 20:56 Rating: 5
Powered by Blogger.