Your SlideShare is downloading. ×
  • Like
Javascript
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Now you can save presentations on your phone or tablet

Available for both IPhone and Android

Text the download link to your phone

Standard text messaging rates apply
Published

 

Published in Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
3,688
On SlideShare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
59
Comments
0
Likes
1

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.  
  • 2. Programming Languages
    • All have…
      • Variables, data types, assignment
      • Arithmetic, relational, and logical operators, and expressions
      • Control structure: if-then, while, loops, iteration
      • Program structure: functions, objects, methods
      • Arrays and strings
      • Input and Output
  • 3. What is JavaScript?
    • JavaScript is a programming/scripting language designed for the Web
    • Javascript is interpreted not compiled
    • JavaScript is not Java
    • JavaScript provides interactivity for Web pages
    • JavaScript may be embedded in HTML or referenced from HTML (like CSS)
    • JavaScript is forgiving and easy to use
  • 4. JavaScript is Object-Oriented
    • JavaScript uses objects that have attributes and methods
    bgColor is an attribute of the document object document.bgColor=“#888888”; write is a method in the document object document.write(“Hello Earl!”); The DOM (Document Object Model)
  • 5. JavaScript is typically used to enhance a Web interface http://pic.fsu.edu/courses/wdp/current/tutorials/javascript/examples/mouseover2.html http://pic.fsu.edu/courses/wdp/current/tutorials/javascript/coolmenu/ http://javascript.internet.com/toc.html http://sixrevisions.com/rapid-development/10_ajax_effects_website_fanciness/ Javascript is a key element in the popular AJAX programming methodology. Javascript code can reference Javascript libraries such as jQuery .
  • 6. JavaScript Embedded in HTML
    • In the html <body>
  • 7. JavaScript Embedded in HTML
    • In the html <body>
    http://www.pic.fsu.edu/courses/wad/tutorials/javascript/examples/doc_write.html
  • 8. JavaScript Embedded in HTML
    • In the html <head>
    http://www.pic.fsu.edu/courses/wad/tutorials/javascript/examples/function.html
  • 9. Working with Variables http://www.pic.fsu.edu/courses/wad/tutorials/javascript/examples/variables.html
  • 10. Working with Variables http://www.pic.fsu.edu/courses/wad/tutorials/javascript/examples/variables2.html
  • 11. HTML Forms
    • Javascript can collect user input through HTML forms.
    http://www.pic.fsu.edu/courses/wad/tutorials/javascript/examples/form_objects.html http://www.pic.fsu.edu/courses/wad/tutorials/javascript/examples/change_background.html http://www.w3schools.com/html/html_forms.asp
  • 12. Calling a function from a form http://www.pic.fsu.edu/courses/wad/tutorials/javascript/examples/form_adder.html http://www.pic.fsu.edu/courses/wad/tutorials/javascript/examples/form_adder2.html v1 and v2 are two variables being passed into function add this.form.v1.value gets the value the user typed in the v1 textbox on the form in this document The button calls the function add when it is clicked (onclick)
  • 13. if – elseif - else http://www.pic.fsu.edu/courses/wad/tutorials/javascript/examples/if_else.html