JavaScript Reference/Javascript Methods/sub

Материал из Web эксперт
Перейти к: навигация, поиск

"sub()" Example

    
<html>
<body>
<button onclick="var myS = new String("Sample String"); 
                 document.write("regular string"+myS.sub());">
sub me
</button>
</body>
</html>



"sub()" is applied to

+----------------+--------------------------------------------------------------+
| Applied_To     |String                                                        |
+----------------+--------------------------------------------------------------+



"sub()" Syntax, Parameters and Note

Note:
Display a string as subscript text.
    
Syntax:
    
stringName.sub()