IT & R – JavaScript Tutorial 1

As this is going to be a self-learning experience, I gladly created my plan of action for this project. I decided to learn about programming in JavaScript, based on what I already know in HTML. For similar learners, the information in the quote below  provides an important starting point to tackle JavaScript.

“Hypertext markup language (HTML) is a language used to create Web pages. The HTML language is interpreted by the Web browser, and it delivers the images and text for the user. JavaScript is a more advanced language to make Web pages dynamic. Both these languages have differences, but they are used in unison to present websites.”

The first difference is seen in the head tags.
1. The tags used to begin and end a script are the <SCRIPT> and </SCRIPT> tags. In the title the following JavaScript tag is used for script type.

<script type=”text/javascript”>

Focusing on the dynamic and interactive nature of JavaScript I learnt two important tag elements for this language.  Using the “Try it Yourself” option found at this link  I created buttons, and alert boxes.

2. Unlike HTML webpages JavaScript is dynamic, therefore creating interactive buttons is vital in this programming language.

<button type=”button” onclick=”()”>All About New Media</button>

3. Alert boxes are another interactive and useful feature in JavaScript. To create alert boxes,

In the head tag

function show_alert()
{alert(“Hello! I am an alert box!”);}

In the body tag

<input type=”button” onclick=”show_alert()” value=”JavaScript Tutorial in Progress for ENGL 766″ />

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s