• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
CSIS 138 Javascript Class1
 

CSIS 138 Javascript Class1

on

  • 1,651 views

Instructor Teresa Pelkie at Palomar College - Introduction to JavaScript

Instructor Teresa Pelkie at Palomar College - Introduction to JavaScript

Statistics

Views

Total Views
1,651
Views on SlideShare
1,650
Embed Views
1

Actions

Likes
0
Downloads
68
Comments
0

1 Embed 1

http://www.slideshare.net 1

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

CC Attribution-NonCommercial-ShareAlike LicenseCC Attribution-NonCommercial-ShareAlike LicenseCC Attribution-NonCommercial-ShareAlike License

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • The JavaScript Language consists of objects CSIS 138 Instructor Teresa Pelkie

CSIS 138 Javascript Class1 CSIS 138 Javascript Class1 Presentation Transcript

  • JavaScript – Class 1 Overview of the Basics
    • Objects
      • Properties
      • Methods
      • Events
  • JavaScript Syntax
    • document.bgColor = “red”;
    • document.write( );
    • // change color to red
    • /* change color to red
    • and write to the page
    • */
  • JavaScript Objects
    • Built in JavaScript Objects
      • Navigator Object
      • Date Object
      • Math Object
      • String Object
      • Array Object
  • JavaScript Objects
    • Browser Objects
  • Where is JavaScript code placed?
    • <head>
    • <script type=”text/JavaScript” language=&quot;JavaScript&quot;>  <!- -
    • statements go here ; //-->
    • </script>
    • </head>
  • Where is JavaScript code placed?
    • <head>
    • <script type=”text/JavaScript”> 
    • statements go here ;
    • </script>
    • </head>
  • Where is JavaScript code placed?
    • <head>
    • <script type=”text/JavaScript” src=”file.js”>
    • </script>
    • </head>
  • Where is JavaScript code placed?
    • <head>
    • <script type=”text/JavaScript”>  statements go here ;
    • </script>
    • <script type=”text/JavaScript” src=”file.js”>
    • </script>
    • </head>
  • Where is JavaScript code placed?
    • <body>
    • <a href=&quot;#&quot; onmouseover=“showPic();&quot;>click</a>
    • <a href=”javascript:openWin();”>click</a>
    • </body>
  • <noscript> You need JavaScript to see this page! </noscript>
  • Data and Types
    • Information that we process and display
    • Can be in many forms or types
      • Numeric
      • String
      • Boolean
  • Variables
    • Hold information or data
    • Can hold these types of data
      • Numeric
      • String
      • Boolean
  • How we create or declare a variable
    • var myName;
  • Initializing a variable
    • var myName;
    • myName = “Teresa”;
    • _______________________
    • var myName = “Teresa”;
  • Initializing a variable
    • var myAge;
    • myAge = 21;
    • _______________________
    • var zipCode;
    • zipCode = “92082”;
  • The alert() method alert(); window.alert();
  • The alert() method <head> <script language=&quot;JavaScript&quot;> alert (&quot;This is an alert()&quot;); </script> </head>
  • The alert() method
  • The alert() method <script language=”JavaScript”> var myFirstVariable; myFirstVariable = “Hello!”; alert(myFirstVariable); </script>
  • The alert() method
  • The write() method <body> <script language=”JavaScript”> document.write (&quot;Hello World&quot;); </script> </body>
  • The write() method
  • The write() method <body> <script language=”JavaScript”> document.write (‘Hello “Big” World’); </script> </body>
  • The write() method
  • The write() method <script language=&quot;JavaScript&quot;> var firstVar; var secondVar firstVar = &quot;Hello&quot;; secondVar = &quot;World!&quot;; document.write( firstVar + “ “ + secondVar ); </script>
  • The write() method
  • The write() method <script language=&quot;JavaScript&quot;> var first; var last; first = “Teresa&quot;; last = “Pelkie&quot;; document.write(“<b>Hello “ + first + “ “ + last + “</b>”); </script>
  • The write() method
    • JavaScript – Class 1
    • Assignment 1