Friday, October 17, 2014

Write A program to use of String Function in javascript.(using all formatting method)


Write A program to use of String Function in javascript.(using all formatting method)
Code : stringfun1.html

<html>
<head>
<title> Common string Functions </title>
<style type="text/css">
.body
{
background:black;
color:violet;
font-size:35px;
line-height:180%;
}
</style>
<script type="text/javascript">
varstr="Hello Good Afternoon";
var str1="H";
var str2="2";
</script>
</head>
<body class="body">
<script type="text/javascript">
document.write("<br>big() : Display string into bold face : ");
document.write(str.big());
document.write("<br>bold() : Display String into bold face : ");
document.write(str.bold());
document.write("<br>small() : Display string into small face : ");
document.write(str.small());
document.write("<br>italics() : Display string into italic face : ");
document.write(str.italics());
document.write("<br>strike() : Display string into strike-through face : ");
document.write(str.strike());
document.write("<br>sup() : Display string as superscript face: ");
document.write(str1+str2.sup());
document.write("<br>sub() : Display smaller font compared to normal font (subscript) : ");
document.write(str1+str2.sub()+"O");
document.write("<br>blink() : Displlay string into blinking effect : ");
document.write(str.blink());
</script>
</body>
</html>

No comments: