SlideShare a Scribd company logo
Introducing JavaScript by Rama Krishnam Raju
JavaScript is the scripting language of the Web .  JavaScript is used in billions of Web pages  to improve the design, validate forms, detect browsers, create cookies, and much more . JavaScript is the most popular scripting language on the internet, and works in all major browsers, such as Internet Explorer, Mozilla, Firefox, Netscape, Opera .
What You Should Already Know .  Before you continue you should have a basic understanding of the following : HTML . What is JavaScript ?   JavaScript was designed to add interactivity to HTML pages. JavaScript is a scripting language A scripting language is a lightweight programming language JavaScript is usually embedded directly into HTML pages JavaScript is an interpreted language (means that scripts execute without preliminary compilation) Everyone can use JavaScript without purchasing a license
Introducing   JavaScript Are Java and JavaScript the same ?  NO!. Java and JavaScript are two completely different languages in both concept and design! Java (developed by Sun Microsystems) is a powerful and much more complex programming language - in the same category as C and C++. Learning JavaScript ?  Special syntax to learn !. Learn the basics and then use other people‘s(lots of free sites) Write it in a text editor, view results in browser You need to revise your HTML
Introducing   JavaScript What can a JavaScript do?   JavaScript gives HTML designers a programming tool -  HTML authors are normally not programmers, but JavaScript is a scripting language with a very simple syntax! Almost anyone can put small &quot;snippets&quot; of code into their HTML pages . JavaScript can put dynamic text into an HTML page  - A JavaScript statement like this: document. write(&quot;<h1>&quot; + name + &quot;</h1>&quot;) can write a variable text into an HTML page JavaScript can read and write HTML elements  - A JavaScript can read and change the content of an HTML element JavaScript can be used to validate data -   A JavaScript can be used to validate form data before it is submitted to a server. This saves the server from extra processing
Introducing JavaScript Arithmetic Operators Arithmetic operators are used to perform arithmetic between variables and/or values. The  following table  explains the arithmetic operators
Introducing JavaScript Assignment Operators Assignment operators are used to assign values to JavaScript variables. The  following table  explains the assignment operators
Introducing JavaScript Comparison Operators Comparison operators are used to compare values to JavaScript variables. The  following table  explains the Comparison operators
Introducing JavaScript Logical Operators Logical operators are used to compare logical values to JavaScript variables. The  following table  explains the Logical operators
Introducing   JavaScript How to Put a JavaScript Into an HTML Page?   <html> <body> <script type=&quot;text/javascript&quot;> document.write(&quot;Hello World!&quot;) </script> </body> </html>
Introducing   JavaScript Using Form Data ? <script type=&quot;text/javascript&quot;> function GetTextBoxValue(id) { alert(document.getElementById(id).value); } </script> <asp:TextBox ID=&quot;txt1&quot; runat=&quot;server&quot;></asp:TextBox> <asp:Button ID=&quot;btnalert&quot; runat=&quot;server&quot; Text=&quot;Submit&quot; OnClientClick=&quot;javascript:GetTextBoxValue('txt1');&quot; />
Introducing   JavaScript   Confirm Box?   A confirm box is often used if you want the user to verify or accept something When a confirm box pops up, the user will have to click either &quot;OK&quot; or &quot;Cancel&quot; to proceed. If the user clicks &quot;OK&quot;, the box returns true. If the user clicks &quot;Cancel&quot;, the box returns false.
Introducing   JavaScript   Prompt Box?   A prompt box is often used if you want the user to input a value before entering a page. When a prompt box pops up, the user will have to click either &quot;OK&quot; or &quot;Cancel&quot; to proceed after entering an input value. If the user clicks &quot;OK“, the box returns the input value. If the user clicks &quot;Cancel“, the box returns null.
Thank You !

More Related Content

What's hot (20)

PPT
Scripting languages
teach4uin
 
PPTX
Xml and JavaScript
Naomi Rinehart
 
PPTX
1. java script language fundamentals
Rajiv Gupta
 
PPTX
Java script
GowriLatha1
 
PPT
Java script
umesh patil
 
PPTX
Javascript 01 (js)
AbhishekMondal42
 
PPTX
Basics of Javascript
poojanov04
 
PDF
Building End-to-End Apps Using Typescript
Gil Fink
 
PDF
Everything You Need To Know About AngularJS
Sina Mirhejazi
 
PDF
Client side scripting
Eleonora Ciceri
 
PPTX
Java script
reddivarihareesh
 
PPS
Razor new view engine asp.net
ahsanmm
 
DOC
Basics java scripts
ch samaram
 
RTF
Java scripts
Capgemini India
 
PPTX
Javascript
Nagarajan
 
PPTX
Introduction to java script
DivyaKS12
 
PPTX
What’s New and Hot in .NET 4.0
Jess Chadwick
 
PPTX
Learn HTML and HTML5
Mohd Azhar Uddin
 
PPT
JSP Custom Tags
BG Java EE Course
 
PPTX
Different examples of jsp codes
karenm30
 
Scripting languages
teach4uin
 
Xml and JavaScript
Naomi Rinehart
 
1. java script language fundamentals
Rajiv Gupta
 
Java script
GowriLatha1
 
Java script
umesh patil
 
Javascript 01 (js)
AbhishekMondal42
 
Basics of Javascript
poojanov04
 
Building End-to-End Apps Using Typescript
Gil Fink
 
Everything You Need To Know About AngularJS
Sina Mirhejazi
 
Client side scripting
Eleonora Ciceri
 
Java script
reddivarihareesh
 
Razor new view engine asp.net
ahsanmm
 
Basics java scripts
ch samaram
 
Java scripts
Capgemini India
 
Javascript
Nagarajan
 
Introduction to java script
DivyaKS12
 
What’s New and Hot in .NET 4.0
Jess Chadwick
 
Learn HTML and HTML5
Mohd Azhar Uddin
 
JSP Custom Tags
BG Java EE Course
 
Different examples of jsp codes
karenm30
 

Viewers also liked (7)

PPT
Controls
Iblesoft
 
PPTX
Generics
Iblesoft
 
PPTX
Microsoft.net architecturte
Iblesoft
 
PPT
Generics n delegates
Iblesoft
 
PPT
MS SQL Server 1
Iblesoft
 
PPT
Ajaxppt
Iblesoft
 
PPT
Ms sql server ii
Iblesoft
 
Controls
Iblesoft
 
Generics
Iblesoft
 
Microsoft.net architecturte
Iblesoft
 
Generics n delegates
Iblesoft
 
MS SQL Server 1
Iblesoft
 
Ajaxppt
Iblesoft
 
Ms sql server ii
Iblesoft
 
Ad

Similar to Javascript (20)

PPTX
Java script
Abhishek Kesharwani
 
PPTX
JavaScript_III.pptx
rashmiisrani1
 
PDF
CS8651- Unit 2 - JS.internet programming paper anna university -2017 regulation
amrashbhanuabdul
 
PDF
Unit 2.4
Abhishek Kesharwani
 
DOCX
Unit 2.4
Abhishek Kesharwani
 
PPT
Java script
sanjay joshi
 
PPTX
gdscWorkShopJavascriptintroductions.pptx
sandeshshahapur
 
PPTX
Lecture 5 javascript
Mujtaba Haider
 
PDF
javascriptPresentation.pdf
wildcat9335
 
PPTX
WT Module-3.pptx
RamyaH11
 
PPTX
javascript client side scripting la.pptx
lekhacce
 
PDF
Javascript tutorial basic for starter
Marcello Harford
 
PPTX
Java script basics
Shrivardhan Limbkar
 
PPT
UNIT 3.ppt
MadhurRajVerma1
 
PPTX
Java script
Rajkiran Mummadi
 
PPTX
Web Technology Part 2
Thapar Institute
 
PPTX
Web designing unit 4
Dr. SURBHI SAROHA
 
DOC
2javascript web programming with JAVA script
umardanjumamaiwada
 
PPTX
Javascript
Mozxai
 
PPTX
JavaScript New Tutorial Class XI and XII.pptx
rish15r890
 
Java script
Abhishek Kesharwani
 
JavaScript_III.pptx
rashmiisrani1
 
CS8651- Unit 2 - JS.internet programming paper anna university -2017 regulation
amrashbhanuabdul
 
Java script
sanjay joshi
 
gdscWorkShopJavascriptintroductions.pptx
sandeshshahapur
 
Lecture 5 javascript
Mujtaba Haider
 
javascriptPresentation.pdf
wildcat9335
 
WT Module-3.pptx
RamyaH11
 
javascript client side scripting la.pptx
lekhacce
 
Javascript tutorial basic for starter
Marcello Harford
 
Java script basics
Shrivardhan Limbkar
 
UNIT 3.ppt
MadhurRajVerma1
 
Java script
Rajkiran Mummadi
 
Web Technology Part 2
Thapar Institute
 
Web designing unit 4
Dr. SURBHI SAROHA
 
2javascript web programming with JAVA script
umardanjumamaiwada
 
Javascript
Mozxai
 
JavaScript New Tutorial Class XI and XII.pptx
rish15r890
 
Ad

More from Iblesoft (10)

PPTX
Master pages ppt
Iblesoft
 
DOCX
State management
Iblesoft
 
PPTX
State management
Iblesoft
 
PPT
Validation controls ppt
Iblesoft
 
PPT
Ado.net
Iblesoft
 
PPT
Data controls ppt
Iblesoft
 
PPT
Asp.net architecture
Iblesoft
 
PPTX
Delegates and events
Iblesoft
 
PPT
Html ppt
Iblesoft
 
PPT
Exception handling
Iblesoft
 
Master pages ppt
Iblesoft
 
State management
Iblesoft
 
State management
Iblesoft
 
Validation controls ppt
Iblesoft
 
Ado.net
Iblesoft
 
Data controls ppt
Iblesoft
 
Asp.net architecture
Iblesoft
 
Delegates and events
Iblesoft
 
Html ppt
Iblesoft
 
Exception handling
Iblesoft
 

Javascript

  • 1. Introducing JavaScript by Rama Krishnam Raju
  • 2. JavaScript is the scripting language of the Web . JavaScript is used in billions of Web pages to improve the design, validate forms, detect browsers, create cookies, and much more . JavaScript is the most popular scripting language on the internet, and works in all major browsers, such as Internet Explorer, Mozilla, Firefox, Netscape, Opera .
  • 3. What You Should Already Know . Before you continue you should have a basic understanding of the following : HTML . What is JavaScript ? JavaScript was designed to add interactivity to HTML pages. JavaScript is a scripting language A scripting language is a lightweight programming language JavaScript is usually embedded directly into HTML pages JavaScript is an interpreted language (means that scripts execute without preliminary compilation) Everyone can use JavaScript without purchasing a license
  • 4. Introducing JavaScript Are Java and JavaScript the same ? NO!. Java and JavaScript are two completely different languages in both concept and design! Java (developed by Sun Microsystems) is a powerful and much more complex programming language - in the same category as C and C++. Learning JavaScript ? Special syntax to learn !. Learn the basics and then use other people‘s(lots of free sites) Write it in a text editor, view results in browser You need to revise your HTML
  • 5. Introducing JavaScript What can a JavaScript do? JavaScript gives HTML designers a programming tool - HTML authors are normally not programmers, but JavaScript is a scripting language with a very simple syntax! Almost anyone can put small &quot;snippets&quot; of code into their HTML pages . JavaScript can put dynamic text into an HTML page - A JavaScript statement like this: document. write(&quot;<h1>&quot; + name + &quot;</h1>&quot;) can write a variable text into an HTML page JavaScript can read and write HTML elements - A JavaScript can read and change the content of an HTML element JavaScript can be used to validate data - A JavaScript can be used to validate form data before it is submitted to a server. This saves the server from extra processing
  • 6. Introducing JavaScript Arithmetic Operators Arithmetic operators are used to perform arithmetic between variables and/or values. The following table explains the arithmetic operators
  • 7. Introducing JavaScript Assignment Operators Assignment operators are used to assign values to JavaScript variables. The following table explains the assignment operators
  • 8. Introducing JavaScript Comparison Operators Comparison operators are used to compare values to JavaScript variables. The following table explains the Comparison operators
  • 9. Introducing JavaScript Logical Operators Logical operators are used to compare logical values to JavaScript variables. The following table explains the Logical operators
  • 10. Introducing JavaScript How to Put a JavaScript Into an HTML Page? <html> <body> <script type=&quot;text/javascript&quot;> document.write(&quot;Hello World!&quot;) </script> </body> </html>
  • 11. Introducing JavaScript Using Form Data ? <script type=&quot;text/javascript&quot;> function GetTextBoxValue(id) { alert(document.getElementById(id).value); } </script> <asp:TextBox ID=&quot;txt1&quot; runat=&quot;server&quot;></asp:TextBox> <asp:Button ID=&quot;btnalert&quot; runat=&quot;server&quot; Text=&quot;Submit&quot; OnClientClick=&quot;javascript:GetTextBoxValue('txt1');&quot; />
  • 12. Introducing JavaScript Confirm Box? A confirm box is often used if you want the user to verify or accept something When a confirm box pops up, the user will have to click either &quot;OK&quot; or &quot;Cancel&quot; to proceed. If the user clicks &quot;OK&quot;, the box returns true. If the user clicks &quot;Cancel&quot;, the box returns false.
  • 13. Introducing JavaScript Prompt Box? A prompt box is often used if you want the user to input a value before entering a page. When a prompt box pops up, the user will have to click either &quot;OK&quot; or &quot;Cancel&quot; to proceed after entering an input value. If the user clicks &quot;OK“, the box returns the input value. If the user clicks &quot;Cancel“, the box returns null.