String format related methods: - Javascript String

Javascript examples for String:big

Description

String format related methods:

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<body>

<script>

var txt = "Hello World!";

document.write("The original string: " + txt);

document.write("<p>Big: " + txt.big() + "</p>");
document.write("<p>Small: " + txt.small() + "</p>");

document.write("<p>Bold: " + txt.bold() + "</p>");
document.write("<p>Italic: " + txt.italics() + "</p>");

document.write("<p>Fixed: " + txt.fixed() + "</p>");
document.write("<p>Strike: " + txt.strike() + "</p>");

document.write("<p>Fontcolor: " + txt.fontcolor("green") + "</p>");
document.write("<p>Fontsize: " + txt.fontsize(6) + "</p>");

document.write("<p>Subscript: " + txt.sub() + "</p>");
document.write("<p>Superscript: " + txt.sup() + "</p>");

document.write("<p>Link: " + txt.link("https://www.java2s.com") + "</p>");

document.write("<p>Blink: " + txt.blink() + " (does not work in IE, Chrome, Firefox or Safari)</p>");

</script>// w w w.  ja v a 2 s.  c o m

</body>
</html>

Related Tutorials