Home Javascript JavaScript method big()



JavaScript method big()
Posted on: October 7, 2010 at 12:00 AM
This section illustrates you the use of JavaScript method big(). The big() method allows you to display the specified string in a big font.

JavaScript method big()

     

This section illustrates you the use of JavaScript method big(). The big() method allows you to display the specified string in a big font. You can see in the given example that we have used the method big() that will change the font of the specified string. We have create a button which calls the function changeFont() from the script and displays the string in big font .

 

 

 

Here is the code:

<html>
<script>
function changeFont(){
var text = document.getElementById("small").innerText;
document.getElementById("small").innerHTML = text.big();
}
</script>
<h2>Use of method big()</h2>
<div id="small">Hello</div>
<button onclick="changeFont()">Change Font</button>
</html>

Output will be displayed as:

On clicking the button, you will see the string with changed font:

Download Source Code:

     

Related Tags for JavaScript method big():


More Tutorials from this section

Ask Questions?    Discuss: JavaScript method big()  

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 

Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.