Presentation is loading. Please wait.

Presentation is loading. Please wait.

Information Technology Center Hany Abdelwahab Computer Specialist.

Similar presentations


Presentation on theme: "Information Technology Center Hany Abdelwahab Computer Specialist."— Presentation transcript:

1 Information Technology Center Hany Abdelwahab Computer Specialist

2 Java Script

3 In This Lesson we will talk about What is java Script ? What can we do with Java script ? Can you able to use it ?

4 Introduction to Java Script

5 What is Java Script ? Is a language help us to create interactive web site.It has many Feature than HTML: Independent Platform Easy to Learn Easy to Use

6 Can you able to use it ? Yes You Can Because it don’t need any Experience in any programming language but the HTML is require

7 What can we do with Java script ? Animation Dialog Box Games, Application Arithmetic Calculation Interactive Design

8 Create a First Program: HTML Code

9 Create a First Program: Insert Java Script Code in HTML Code

10 Make a Comment One Line

11 Make a Comment Multiple Line

12 Where can we write the code In the HEAD or in the BODY

13 Messages in Java Script

14 Alert Give a user Specific Information

15

16 Prompt Ask a user for a Specific Information

17 Confirm Ask a user for answer affirmation

18 Confirm Example

19 Message Example

20 Variables Number String Boolean Null

21 Variable Name Don’t Start with Number or Special Character as # Don’t has Space as First name There is a difference between Capital and Small Character because JavaScript is Case sensitive.

22 Reserved Words

23 Variable Example

24

25 Concatenation

26 Logical Expression This Means: A=B is False

27 Relation Expression Is a Comparison between the value of left and the value of right

28 Complex Logical Expression && AND means that must the two part is true || OR means that at least one of two part is true ! NOT means that Opposite

29 Logical Expression Example FALSE True && True TRUE True && False FALSE

30 Function The main Idea of FUNCTION is Divide a large program into Parts which all of this parts do a specific task

31 Function Example

32 Why we use parseInt() Function IF we write : The Result :

33 Conditional Statement

34 IF statement Compare the given Data and IF this data is true then give the specific Result For Example if the data

35 IF statement The Structure of IF statement

36 IF Example

37 IF Else statement The Structure of IF Else statement

38 IF Else Example

39 Switch Statement As IF statement but it is use if there is many Choises The Structure of Switch statement

40 Switch Statement Example

41

42 Loop Statement

43 While Statement If the condition is True then Start the loop Until The Condition is False

44 While Statement Example

45 Do While Statement As While but the difference is the Condition in the end of Loop

46 Compare between While and Do While While Loop Do While Loop

47 For Statement

48 For Statement Example

49

50 Window Object Window Object is the Root of all Object The Syntax is :

51 Window Object Property Length If we want to know the number of Frame in this Page

52 Window Object Property Status Text appear in a status bar which give an information of any part of page when you point by mouse

53 Window Object Method alert() For Example:

54 Window Object Method Confirm() For Example:

55 Window Object Method Prompt() For Example:

56 Window Object Method Close() If we want to Close the window

57 Window Object Method Open() If we want to Open a new window

58 Window Object Method Open() If we want to Open a new window but Specify a property With 1 to Enable or 0 to Disable

59 Window Object Method Example Open() and Close()

60 Document Object Document Object is a branch of window object

61 Document Object Property bgColor Change the background Color of Document For Example:

62 Document Object Property bgColor In the last Example You can use Hexadecimal Color number For Example:

63 Document Object Property fgColor Change the Foreground Color of Document For Example:

64 Document Object Property lastModified What last Time was this page Modify ? For Example:

65 Document Object Property Title It is appear the title of this page For Example:

66 Document Object Property Location Responsible for defining the path of page For Example:

67 Document Object Property Forms This is an array of forms in the page any form has an Index start with number 0 For Example:

68 Document Object Property Forms

69 Document Object Method Prepare a Document to Write Close the Window which we was write Write on Document that appear on a browser Write but make a new line after writing

70 Image Object Method The event when the mouse pass over an Image The event when you click by the mouse on Image The event when you move the mouse far off Image

71 Image Object Method Example

72 Location Object Used to transport to another web page For Example :

73 String Object String is a Text, Number, Character, Null

74 String Object Example

75 Write Some Symbol in String When we Write a Symbol with This way This is wrong and the Symbol isn’t appear

76 Write Some Symbol in String The Solution is : Write Backslash before the Symbol

77 Write Some Symbol in String The Solution is : Write Backslash before the Symbol

78 Form Object Syntax by array : Or by their name Or Combine the name and array

79 Form Object With Event

80 Form Object Property action Example :

81 Form Object Property elements Syntax :

82 Form Object Property Length Calculate the number of elements in form

83 Form Object Property Length

84 Form Object Property Method

85 Form Object Property Method Example

86 Form Object Property Name with Example Give the name to Form

87 Form Method

88 Form Event

89 Form Method onsubmit

90 Button Object

91 Button Object Property name

92 Button Object Property Value

93 Button Object Method Click() and Event onClick

94 Checkbox Object Method Click() and Event onClick Example : Part-1 First I will create a button

95 Checkbox Object Method Click() and Event onClick Example : Part-2 Second I will create a function

96 Text and Textarea Object Example :

97 Text and Texarea Object Method Remove the element from this element Put the element in this element Select the Content from this element

98 Text and Texarea Object Event onblur Example :

99 Text and Texarea Object Event onfocus Example :


Download ppt "Information Technology Center Hany Abdelwahab Computer Specialist."

Similar presentations


Ads by Google