Gateway Educational and Welfare Society Regd. with Govt. of Punjab
Set Home Page Favorite   Home About Society Contact

Gateway Education and Welfare Society (Regd.)
(An ISO 9001 Certified Organisation)

  * More than 2500 students
  * 10 GLORIOUS Years
  * Over 100 Educational Camps & Classes
* Rural Areas

Gateway Education and Welfare Society (Regd.),  Reg. No. DIC/DRA/1218 of 2002--

 
New Page 1
  PRIDE OF GATEWAY
 
Vineet 
  Gateway Institute
Courses
Admission Form
Industrial Training
Certification Criteria
Current Staff
Certificate Form
Project CAMPS Report...
Branch Offices
View Certificate Copy
Presentation
Project Development
  Sikkim Manipaula Uni.
About University
Courses
  Hartron Workstation
HARTRON Courses
Admission Criteria

  MANONMANIAM SUNDARANAR UNIVERSITY

MSU Courses
MSU Date-Sheet (Nov-2010)
  Articals
Sangrur
Education In Sangrur
Computer Literacy
Directory Of Sangrur
Punjab (Links and General Info.)
Engineering Colleges in Punjab
Govt. Jobs in Punjab - CDAC Mohali

Google Search

The Web gatewaysol.com

SMU

 
Ms-Word

What is JavaScript?

JavaScript is the Netscape-developed object scripting language used in millions of web pages and server applications worldwide. Netscape's JavaScript is a superset of the ECMA-262 Edition 3 (ECMA Script) standard scripting language, with only mild differences from the published standard.

Contrary to popular misconception, JavaScript is not "Interpretive Java". In a nutshell, JavaScript is a dynamic scripting language supporting prototype based object construction. The basic syntax is intentionally similar to both Java and C++ to reduce the number of new concepts required to learn the language. Language constructs, such as if statements, for and while loops, and switch and try ... catch blocks function the same as in these languages (or nearly so.)

JavaScript can function as both a procedural and an object oriented language. Objects are created programmatically in JavaScript, by attaching methods and properties to otherwise empty objects at run time, as opposed to the syntactic class definitions common in compiled languages like C++ and Java. Once an object has been constructed it can be used as a blueprint (or prototype) for creating similar objects.

JavaScript's dynamic capabilities include runtime object construction, variable parameter lists, function variables, dynamic script creation (via evil), object introspection (via for ... in), and source code recovery (JavaScript programs can decompile function bodies back into their source text)

Intrinsic objects are Number, String, Boolean, Date, RegExp, and Math.

For a more in depth discussion of JavaScript programming follow the JavaScript resources links below.

What JavaScript implementations are available?

mozilla.org hosts two JavaScript implementations. The first ever JavaScript was created by Brendan Each at Netscape, and has since been updated (in JavaScript 1.5) to conform to ECMA-262 Edition 3. This engine, code named Spider Monkey, is implemented in C. The Rhino engine, created primarily by Norris Boyd (also at Netscape) is a JavaScript implementation in Java. Like Spider Monkey, Rhino is ECMA-262 Edition 3 compliant.

Each mozilla.org JavaScript engine exposes a public API applications can call on for JavaScript support. By far, the most common host environment for JavaScript is web browsers. Web browsers typically use the public API to create 'host objects' responsible for reflecting the DOM into JavaScript.

Another common application for JavaScript is as a (web) server side scripting language. A JavaScript web server would expose host objects representing a HTTP request and response objects, which could then be manipulated by a JavaScript program to dynamically generate web pages.

For more information on embedding JavaScript in your own applications, follow either the Spider Monkey or Rhino links below, or visit us on the nets cape .public .maxilla. sang newsgroup

Java Script is used in millions of Web pages to add functionality, validate forms, detect browsers, and much more.

JavaScript is easy to learn! You will enjoy it!

JavaScript is a small, lightweight, object-oriented, cross-platform scripting language. For a brief introduction, read About JavaScript.

For information about using JavaScript in browsers, please see DOM and DHTML topics. The Gecko DOM Reference describes the host objects available in Gecko-based browsers

 

Basic java script example

<html>

<body>

<script type="text/java script"><html>

<script type="text/java script">

Document . write("<h1>This is a header</h1>");

</script>

</body>

</html>

 

JavaScript Statements, Comments and Blocks

 

<html>

<body>

<script type="text/java script">

Document .write("<h1>This is a header</h1>");

Document . write("<p>This is a paragraph</p>");

Document . write("<p>This is another paragraph</p>");

</script>

</body>

</html

</body>

</html>

JavaScript Variables

 

<html>

<body>

<script type="text/java script">

var first name;

first name="Hegel";

document . write(first name);

document . write("<br />");

first name="Tove";

document . write(first name);

</script>

<p>The script above declares a variable,

assigns a value to it, displays the value, change the value,

and displays the value again.</p>

</body>

</html>

JavaScript Conditional If ... Else

 

<html>

<body>

<script type="text/java script">

var d = new Date();

var time = d.get Hours();

if (time < 10)

{

document.write("<b>Good morning</b>");

}

</script>

<p>

This example demonstrates the If statement.

</p>

<p>

If the time on your browser is less than 10,

you will get a "Good morning" greeting.

</p>

</body>

</html>

 

String Object

 

<html>

<body>

<script type="text/java script">

var txt="Hello World!";

document.write (txt.length);

</script>

</body>

</html>

 

 

 

Date Object

 

<html>

<body>

<script type="text/java script">

document.write(Date());

</script>

</body>

</html>

 

Array Object

 

<html>

<body>

<script type="text/java script">

var mycars = new Array();

my cars[0] = "Saab";

my cars[1] = "Volvo";

my cars[2] = "BMW";

for (i=0;i<mycars.length;i++)

{

document.write(my cars[i] + "</br>");

}

</script>

</body>

</html>

 

Math Object

 

<html>

<body>

<script type="text/java script">

document.write(Math . round(0.60) + "<br>)”;

document.write(Math . round(0.50) + "<br>)";

document.write(Math . round(0.49) + "<br>)";

document.write(Math . round(-4.40) + "</br>)";

document.write(Math . round(-4.60));

</script>

</body>

</html>

 

Anchor Object

 

<html>

<head>

<script type="text/javascript">

function changeLink()

{

Document . get ElementById('myAnchor').innerHTML="Visit W3Schools";

Document . getElementById('myAnchor').href="http://www.w3schools.com";

Document . getElementById('myAnchor').target="_blank";

}

</script>

</head>

<body>

<a id="myAnchor"

href="http://www.microsoft.com">Visit Microsoft</a>

<input type="button" onclick="changeLink()" value="Change link">

<p>In this example we change the text and the URL of a hyperlink. We also change the target attribute.

The target attribute is by default set to "_self", which means that the link will open in the same window.

By setting the target attribute to "_blank", the link will open in a new window.</p>

</body>

</html>

 

Document Object

 

<html>

<body>

<script type="text/javascript">

Document . write("Hello World!");

</script>

</body>

</html>

 

Event Object

 

<html>

<head>

<script type="text/javascript">

function whichButton(event)

{

if (event . button==2)

  {

  alert("You clicked the right mouse button!");

  }

else

  {

  alert("You clicked the left mouse button!");

  }

}

</script>

</head>

<body onmousedown="whichButton(event)">

<p>Click in the document. An alert box will alert which mouse button you clicked.</p>

</body>

</html>

 

Form and Form Input Objects

<html>

<head>

<script type="text/javascript">

function change Action()

{

var x=document . getElementById("myForm");

alert ("Original action: " + x .action);

x . action="default . asp";

alert("New action: " + x . action);

x . submit();

}

</script>

</head>

<body>

<form id="myForm"  action="js_examples.asp">

Name: <input type="text" value="Mickey Mouse" />

<input type="button" onclick="changeAction()"

value="Change action attribute and submit form" />

</form>

</body>

</html>

 

Frame, Frameset, and IFrame Objects

 

<html>

<frameset cols="50%,50%">

  <frame id = "leftFrame" src="frame_noresize.htm">

  <frame id = "rightFrame" src="frame_a.htm">

</frameset>

</html>

 

Image Object

 

<html>

<head>

<script type="text/javascript">

function  changeSize ()

{

Document . getElementById ("compman").height="250";

Document . getElementById ("compman").width="300";

}

</script>

</head>

<body>

<img id="compman" src="compman.gif" width="107" height="98" />

<br /><br />

<input type="button" onclick="changeSize()" value="Change height and width of image">

</body>

</html>

 

Location Object

 

<html>

<head>

<script type="text/javascript">

function currLocation ()

{

Alert (window . location);

}

function  newLocation ()

{

window.location="http://www.w3schools.com";

}

</script>

</head>

<body>

<input type="button" onclick="currLocation()" value="Show current URL">

<input type="button" onclick="newLocation()" value="Change URL">

</body>

</html>

New Page 1

Glimpses Of Institute

LOGIN USER

User
Password

[  Notice Board  ]

Date :2011-11-26 11:35:04
SKILL DEVELOPMENT PROGRAM " COMPUTER ACCOUNTS- TALLY " LAST DATE OF REGISTRATION :- 08.12.2011 CAMP STARTS FROM :- 12.12.2011
Date :2011-04-15 14:32:36
Vist at Gateway to see Result of Hartron Exam held on 12/03/2011

Society Events Gallery

Society In News

New Page 2
Gateway Solutions is a Computer Institute in sangrur,punjab Run By Society to provide Quality and Career OrientedComputer Education To poor and Needy People.An ISO 9001-2008 certified institute
www.gatewaysol.com
Megastarshine.com :: young teen, beautiful Asian female and Indian male models. Browse free latest portfolio of aspiring kids & child models, fashion designers, professional photographers. Offer best commercial and fashion modeling agency, scout and job service.
www.megastarshine.com
keshavhcn.com : Keshav Health Care Networking Pvt. Ltd. :
www.keshavhcn.com
Tradedost.com : TradeDost is a visionary platform for all the Trades in all major Districts and Cities. Here you can Register your Business/ Occupation / Establishment For Growth in all over the region TradeDost.com is the most comprehensive online Yellowpages. You can promote your Business by advertising Here .....
www.tradedost.com
Valmikiresearch.com : This Web Site is Dedidcated to Whole Valmiki Samaaj.Valmiki Research is a mission started by Dr. Dev Singh "Advaiti" Dharam Guru,Saroach Nirdhesak, Bhartiya Valmiki Dharam Samaaj(Regd.)-Bhavadhs
www.valmikiresearch.com
PMRANetwork.com : Our mission is to provide the best quality products and to constantly improve, Innovate and  evolve to meet the growing needs of our customers.
www.cccsangrur.com
Home About Society Aims and Objects Contact OnLine Test Sitemap
Gateway Educational and Welfare Society
 is an NGO Regd. with Govt. Of Punjab to promote the skills of poor and needy youth of INDIA so that they may earn respectful living hood. Presently the area of functioning of Society is Sangrur Distt.

Copyright to Starshine India
All rights are Reserved
Designed and Programmed By Parmjeet Kaur, Amit Kumar