JavaScript treats Strings as objects, and therefore there is a respective String Object Class
that contains functions for manipulating the strings. This can make JavaScript very handy for manipulating the text without having to write all of the text formatting in html code.
<html>
<body>
<script type="text/javascript">
var line="I am a line of text";
document.write("Original lineence: "+line);
document.write("<br />");
document.write("blink, works in FF not IE "+line.fontcolor("orange").blink());
document.write("<br />");
document.write("toLowerCase() "+line.fontcolor("green").toLowerCase());
document.write("<br />");
document.write("toUpperCase() "+line.fontcolor("red").toUpperCase());
document.write("<br />");
document.write("toLowerCase() "+line.fontcolor("green").toLowerCase());
document.write("<br />");
document.write("big() "+line.big());
document.write("<br />");
document.write("small() "+line.fontcolor("red").small());
document.write("<br />");
document.write("bold() "+line.bold());
document.write("<br />");
document.write("italics() "+line.fontcolor("green").italics());
document.write("<br />");
document.write("fixed() "+line.fontcolor("brown").fixed());
document.write("<br />");
document.write("fontsize(5) "+line.fontcolor("green").fontsize(5));
document.write("<br />");
document.write('indexOf("h") '+line.fontcolor("green").indexOf("h"));
document.write("<br />");
document.write('lastIndexOf("l") '+line.fontcolor("green").lastIndexOf("l"));
document.write("<br />");
document.write("Superscript--sup() "+line.fontcolor("green").sup());
document.write("<br />");
document.write("Subscript--sub() "+line.fontcolor("green").sub());
document.write("<br />");
document.write("strike() "+line.fontcolor("red").strike());
var linked="Bertini Shoes";
document.write("<br />");
document.write("link() "+linked.fontcolor("green").link("http://www.bertini-shoes.com"));
</script>
</body>
</html>
This will produce the following output:
832d0efe-2c84-4f05-8532-fe293064b3a7|0|.0