Your SlideShare is downloading. ×
0
Javascript
Javascript
Javascript
Javascript
Javascript
Javascript
Javascript
Javascript
Javascript
Javascript
Javascript
Javascript
Javascript
Javascript
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Javascript

1,613

Published on

Presentation on Java Script

Presentation on Java Script

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
1,613
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
42
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

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

×