by Dinesh Thakur Category: Javascript String

JavaScript Big Method: JavaScript Big Method is used to display a specified string in a big size font. JavaScript Big Method returns the string with the tag <BIG> surrounding it, like this:

<big>string</big>

Assuming you have assigned a string to a variable, you call these JavaScript Big Method as follows:

String_variable.big();

You can see in the given example that we have used the JavaScript Big Method that will change the font of the specified string.

1. Open a new HTML document in your preferred HTML or text editor.

2. Create the body of the document with opening and closing body tags:

<body>

</body>

3. Insert a script block in the body of the document:

<script language="JavaScript">

<!--//
-->

</script>

4. Create a variable named String_variable and assign the value “Hello JavaScript” to it:

var String_variable = "Hello JavaScript"

5. Use the document.write method to display the value of the variable as altered by each of the formatting methods

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"

"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
   <title>JavaScript big() method </title>
</head>
<body>
   <h1 style="color: blue"> javascript big()</h1> <hr />
    <script type="text/javascript">
     var String_variable = "Hello JavaScript";
     alert(String_variable.big());
</script>
</body>
</html>

6. Open the file in a browser. You should see the text “Hello JavaScript” displayed in formatting methods as below.

JavaScript Big() Method

 



About Dinesh Thakur

Dinesh ThakurDinesh Thakur holds an B.C.A, MCSE, MCDBA, CCNA, CCNP, A+, SCJP certifications. Dinesh authors the hugely popular blog. Where he writes how-to guides around Computer fundamental , computer software, Computer programming, and web apps. For any type of query or something that you think is missing, please feel free to Contact us.