What is it?
- Client-Side Scripting Language (we send the code to the client and let them run it)
Asp.Net is sever side
- Developed by Sun Microsystem
- Programming Language of the web that adds interactivity to the pages
- Only works inside a web browser to manipulate web pages. Cannot be used in windows application. Does not have access to file system, database, usb port
- jquery - 3rd party javascript library . provide excellent cross browser functions (Microsoft product)
- web pages have the following 3 core languages
- html - content eg: what needs to be displayed and how
- css - presentation eg: background color, font
- javascript - behavior (interactivity) eg: wht happens on mouse click
- EcmaScript 3 - 1999 has full support on IE, Firefox, chrome, opera, safari
Where to put the javascript:
- Inline
- In Script tag
- In another file
-- in original page
alert("hello");is in a new page - myscript.js (by convention it is .js , not necessary)
Variables in Javascript:
name1 = value1; -- value can be string , boolean, numbers
Arrays in Javascript:
Array -- can have bool, int, string togethervar name2 = [];
names2[0]=50;
names2[1]= "aditi" ;
----- or ----
----- or ----
var num4 = new Array(); // arrays are objects
----- or ----
var num5 = Array(); // arrays are dynamic
var num6 = Array(5); // arrays of size 5
Example 1:
click on < a href="javascript:sayhello()"> will call sayhello function
Diff Between HTML4 and HTML5
Html 4 :
Comments
Post a Comment