Introduction to JS

download Introduction to JS

If you can't read please download the document

description

Introduction to JS

Transcript of Introduction to JS

Introduction to JavaScript:IntroductionOperatorsConditional statmentsControl break FunctionsEvent and Event handlerObject ArrayJQuery Introduction to JS:JavaScript:1. Scripting language - Interactive web page2. Over 50 scripting languages3. Default scripting language for browser4. Client side programming5. Not a full fledged programming languageAdvantages:1. Less server interaction2. Immediate results3. Rich user interface4. Increased user interactionLimitations:1. No multi-threading2. Networking application cannot use JSTools:1. Notepad2. Notepad++3. Sublime text editorChrome browser - Default developer toolsFirefox browser - FirebugHow to add JS To a Webpage?1. Internal JS2. External JSInternal JS: - Header/ BodyExternal JS:external.jsStatements:Step by step instruction to acheive a certain job.Syntax:1. Either object or with a keyword2. Case sensitive3. End of statement is represented by semi-colonComments:- non executable lines1. Single line comment - //2. Multiple line comment - /* ...... */3. Commenting html logic - begins with Variable declaration:1. Var is the keyword used to declare the variable2. type for data object is assigned at runtime.Displaying the output:1. document is a default object created for entire web page.2. Using write method of document object we can write the values in the web page.