Theme Layout

Boxed or Wide or Framed

Wide

Theme Translation

Display Featured Slider

Featured Slider Styles

Display Grid Slider

yes

Grid Slider Styles

Display Trending Posts

Display Author Bio

Display Instagram Footer

off

Dark or Light Style

Light

Blog Archive

Powered by Blogger.

Thursday, February 9, 2017

[JavaScript Tutorial] Output


#JavaScript OutPut

 JavaScript Display Possibilities

JavaScript can display data in different ways:
  • Writing into an HTML element, Using innerHTML.
  • Writing into the HTML output, Using document.write().
  • Writing into an alert box, Using window.alert() or alert().
  • Writing into the browser console, Using console.log().

Using inner HTML

To access an HTML element, JavaScript can use the document.getElementById("ID") method. The ID attribute defines the HTML element. The innerHTML property defines the HTML content:

 Using document.write()

For testing purposes, It is convenient to use document.wrtie():

Using the document.write() after an HTML document is fully loaded, will delete all existing HTML:

Using Window.alert()

I can use an alert box to display data:

 Using document.write()

For debugging purposes, I can use the console.log() method to display data.


QuickEdit
Unknown
0 Comments
Share This Post :

You Might Also Like

No comments:

Post a Comment

Follow @SunriseSunsetBlog