XP Tutorial 1 Introducing Java Script Hiding EMail
![XP Tutorial 1 Introducing Java. Script Hiding E-Mail Addresses from Spammers 1 XP Tutorial 1 Introducing Java. Script Hiding E-Mail Addresses from Spammers 1](https://slidetodoc.com/presentation_image/1ea91ad403541a9b395627713be8f10a/image-1.jpg)
![Objectives XP • Understand the history and theory of Java. Script • Create a Objectives XP • Understand the history and theory of Java. Script • Create a](https://slidetodoc.com/presentation_image/1ea91ad403541a9b395627713be8f10a/image-2.jpg)
![Objectives XP • Understand the different data types supported by Java. Script • Declare Objectives XP • Understand the different data types supported by Java. Script • Declare](https://slidetodoc.com/presentation_image/1ea91ad403541a9b395627713be8f10a/image-3.jpg)
![Objectives XP • Access functions from an external Java. Script file • Document code Objectives XP • Access functions from an external Java. Script file • Document code](https://slidetodoc.com/presentation_image/1ea91ad403541a9b395627713be8f10a/image-4.jpg)
![XP Staff Directory at Monroe Public Library Web Page Tutorial 1 New Perspectives on XP Staff Directory at Monroe Public Library Web Page Tutorial 1 New Perspectives on](https://slidetodoc.com/presentation_image/1ea91ad403541a9b395627713be8f10a/image-5.jpg)
![Introduction to Java. Script XP • Spam – Junk e-mail • Spammer – Person Introduction to Java. Script XP • Spam – Junk e-mail • Spammer – Person](https://slidetodoc.com/presentation_image/1ea91ad403541a9b395627713be8f10a/image-6.jpg)
![XP E-Mail Addresses in Staff Directory Tutorial 1 New Perspectives on Java. Script, Comprehensive XP E-Mail Addresses in Staff Directory Tutorial 1 New Perspectives on Java. Script, Comprehensive](https://slidetodoc.com/presentation_image/1ea91ad403541a9b395627713be8f10a/image-7.jpg)
![Server-Side and Client-Side Programming XP • Server-side programming – Program placed on server that Server-Side and Client-Side Programming XP • Server-side programming – Program placed on server that](https://slidetodoc.com/presentation_image/1ea91ad403541a9b395627713be8f10a/image-8.jpg)
![Server-Side and Client-Side Programming XP • Client-side programming – Runs programs on user’s computer Server-Side and Client-Side Programming XP • Client-side programming – Runs programs on user’s computer](https://slidetodoc.com/presentation_image/1ea91ad403541a9b395627713be8f10a/image-9.jpg)
![Server-Side Programming Tutorial 1 New Perspectives on Java. Script, Comprehensive XP 10 Server-Side Programming Tutorial 1 New Perspectives on Java. Script, Comprehensive XP 10](https://slidetodoc.com/presentation_image/1ea91ad403541a9b395627713be8f10a/image-10.jpg)
![Client-Side Programming Tutorial 1 New Perspectives on Java. Script, Comprehensive XP 11 Client-Side Programming Tutorial 1 New Perspectives on Java. Script, Comprehensive XP 11](https://slidetodoc.com/presentation_image/1ea91ad403541a9b395627713be8f10a/image-11.jpg)
![XP Combining Client-Side and Server. Side Programming Tutorial 1 New Perspectives on Java. Script, XP Combining Client-Side and Server. Side Programming Tutorial 1 New Perspectives on Java. Script,](https://slidetodoc.com/presentation_image/1ea91ad403541a9b395627713be8f10a/image-12.jpg)
![XP The Development of Java. Script • Java – Developed by Sun Microsystems – XP The Development of Java. Script • Java – Developed by Sun Microsystems –](https://slidetodoc.com/presentation_image/1ea91ad403541a9b395627713be8f10a/image-13.jpg)
![XP Comparing Java and Java. Script Tutorial 1 New Perspectives on Java. Script, Comprehensive XP Comparing Java and Java. Script Tutorial 1 New Perspectives on Java. Script, Comprehensive](https://slidetodoc.com/presentation_image/1ea91ad403541a9b395627713be8f10a/image-14.jpg)
![XP Versions of Java and Java. Script Tutorial 1 New Perspectives on Java. Script, XP Versions of Java and Java. Script Tutorial 1 New Perspectives on Java. Script,](https://slidetodoc.com/presentation_image/1ea91ad403541a9b395627713be8f10a/image-15.jpg)
![XP Working with the Script Element • Script element – Used to enter scripts XP Working with the Script Element • Script element – Used to enter scripts](https://slidetodoc.com/presentation_image/1ea91ad403541a9b395627713be8f10a/image-16.jpg)
![XP Writing Output to a Web Document • Inserting cadler@mpl. gov in a Web XP Writing Output to a Web Document • Inserting cadler@mpl. gov in a Web](https://slidetodoc.com/presentation_image/1ea91ad403541a9b395627713be8f10a/image-17.jpg)
![XP The document. write() Method • One way to send output to the Web XP The document. write() Method • One way to send output to the Web](https://slidetodoc.com/presentation_image/1ea91ad403541a9b395627713be8f10a/image-18.jpg)
![XP Understanding Java. Script Rules and the Use of White Space • Java. Script XP Understanding Java. Script Rules and the Use of White Space • Java. Script](https://slidetodoc.com/presentation_image/1ea91ad403541a9b395627713be8f10a/image-19.jpg)
![Supporting Non-Java. Script Browsers XP • noscript element – Used by browsers that do Supporting Non-Java. Script Browsers XP • noscript element – Used by browsers that do](https://slidetodoc.com/presentation_image/1ea91ad403541a9b395627713be8f10a/image-20.jpg)
![Supporting Non-Java. Script Browsers XP • CDATA section – Marks text as data that Supporting Non-Java. Script Browsers XP • CDATA section – Marks text as data that](https://slidetodoc.com/presentation_image/1ea91ad403541a9b395627713be8f10a/image-21.jpg)
![XP Working with Variables • Variable – A named item in a program that XP Working with Variables • Variable – A named item in a program that](https://slidetodoc.com/presentation_image/1ea91ad403541a9b395627713be8f10a/image-22.jpg)
![Declaring a Variable XP • Tells Java. Script interpreter to reserve memory space for Declaring a Variable XP • Tells Java. Script interpreter to reserve memory space for](https://slidetodoc.com/presentation_image/1ea91ad403541a9b395627713be8f10a/image-23.jpg)
![Declaring a Variable XP • Limits on variable names – First character must be Declaring a Variable XP • Limits on variable names – First character must be](https://slidetodoc.com/presentation_image/1ea91ad403541a9b395627713be8f10a/image-24.jpg)
![XP Assigning a Value to a Variable • variable = value; • Combining variable XP Assigning a Value to a Variable • variable = value; • Combining variable](https://slidetodoc.com/presentation_image/1ea91ad403541a9b395627713be8f10a/image-25.jpg)
![Working with Data Types XP • Data type – Type of information stored in Working with Data Types XP • Data type – Type of information stored in](https://slidetodoc.com/presentation_image/1ea91ad403541a9b395627713be8f10a/image-26.jpg)
![XP Working with Data Types • Null value – Value has not yet been XP Working with Data Types • Null value – Value has not yet been](https://slidetodoc.com/presentation_image/1ea91ad403541a9b395627713be8f10a/image-27.jpg)
![XP Writing a Variable Value to a Web Document • Variable – Can be XP Writing a Variable Value to a Web Document • Variable – Can be](https://slidetodoc.com/presentation_image/1ea91ad403541a9b395627713be8f10a/image-28.jpg)
![XP Creating a Function to Perform an Action • Functions – Collection of commands XP Creating a Function to Perform an Action • Functions – Collection of commands](https://slidetodoc.com/presentation_image/1ea91ad403541a9b395627713be8f10a/image-29.jpg)
![XP Creating a Function to Perform an Action • Syntax of a Java. Script XP Creating a Function to Perform an Action • Syntax of a Java. Script](https://slidetodoc.com/presentation_image/1ea91ad403541a9b395627713be8f10a/image-30.jpg)
![XP Functions and Variable Scope • Variable scope – Indicates where and how the XP Functions and Variable Scope • Variable scope – Indicates where and how the](https://slidetodoc.com/presentation_image/1ea91ad403541a9b395627713be8f10a/image-31.jpg)
![XP Functions and Variable Scope • Local scope – Variable created within a Java. XP Functions and Variable Scope • Local scope – Variable created within a Java.](https://slidetodoc.com/presentation_image/1ea91ad403541a9b395627713be8f10a/image-32.jpg)
![XP Creating a Function to Return a Value • For a function to return XP Creating a Function to Return a Value • For a function to return](https://slidetodoc.com/presentation_image/1ea91ad403541a9b395627713be8f10a/image-33.jpg)
![XP Accessing an External Java. Script File • Common practice to – Create libraries XP Accessing an External Java. Script File • Common practice to – Create libraries](https://slidetodoc.com/presentation_image/1ea91ad403541a9b395627713be8f10a/image-34.jpg)
![Using an External Script Tutorial 1 New Perspectives on Java. Script, Comprehensive XP 35 Using an External Script Tutorial 1 New Perspectives on Java. Script, Comprehensive XP 35](https://slidetodoc.com/presentation_image/1ea91ad403541a9b395627713be8f10a/image-35.jpg)
![XP Commenting Java. Script Code • Comments – Explain what your programs are designed XP Commenting Java. Script Code • Comments – Explain what your programs are designed](https://slidetodoc.com/presentation_image/1ea91ad403541a9b395627713be8f10a/image-36.jpg)
![Using Comments to Hide Java. Script Code XP • Syntax for hiding script <script Using Comments to Hide Java. Script Code XP • Syntax for hiding script <script](https://slidetodoc.com/presentation_image/1ea91ad403541a9b395627713be8f10a/image-37.jpg)
![Debugging Your Java. Script Programs XP • Load-time error – Occurs when script is Debugging Your Java. Script Programs XP • Load-time error – Occurs when script is](https://slidetodoc.com/presentation_image/1ea91ad403541a9b395627713be8f10a/image-38.jpg)
![Displaying a Logical Error Tutorial 1 New Perspectives on Java. Script, Comprehensive XP 39 Displaying a Logical Error Tutorial 1 New Perspectives on Java. Script, Comprehensive XP 39](https://slidetodoc.com/presentation_image/1ea91ad403541a9b395627713be8f10a/image-39.jpg)
![Common Mistakes XP • Debugging – Process of searching code to locate a source Common Mistakes XP • Debugging – Process of searching code to locate a source](https://slidetodoc.com/presentation_image/1ea91ad403541a9b395627713be8f10a/image-40.jpg)
![XP Debugging Tools and Techniques • Writing modular code – Breaking up a program’s XP Debugging Tools and Techniques • Writing modular code – Breaking up a program’s](https://slidetodoc.com/presentation_image/1ea91ad403541a9b395627713be8f10a/image-41.jpg)
![Microsoft Debugger Window Tutorial 1 New Perspectives on Java. Script, Comprehensive XP 42 Microsoft Debugger Window Tutorial 1 New Perspectives on Java. Script, Comprehensive XP 42](https://slidetodoc.com/presentation_image/1ea91ad403541a9b395627713be8f10a/image-42.jpg)
![XP Tips for Writing Good Java. Script Code • Apply layout techniques to make XP Tips for Writing Good Java. Script Code • Apply layout techniques to make](https://slidetodoc.com/presentation_image/1ea91ad403541a9b395627713be8f10a/image-43.jpg)
![XP Tips for Writing Good Java. Script Code • Create customized functions • Break XP Tips for Writing Good Java. Script Code • Create customized functions • Break](https://slidetodoc.com/presentation_image/1ea91ad403541a9b395627713be8f10a/image-44.jpg)
- Slides: 44
![XP Tutorial 1 Introducing Java Script Hiding EMail Addresses from Spammers 1 XP Tutorial 1 Introducing Java. Script Hiding E-Mail Addresses from Spammers 1](https://slidetodoc.com/presentation_image/1ea91ad403541a9b395627713be8f10a/image-1.jpg)
XP Tutorial 1 Introducing Java. Script Hiding E-Mail Addresses from Spammers 1
![Objectives XP Understand the history and theory of Java Script Create a Objectives XP • Understand the history and theory of Java. Script • Create a](https://slidetodoc.com/presentation_image/1ea91ad403541a9b395627713be8f10a/image-2.jpg)
Objectives XP • Understand the history and theory of Java. Script • Create a script element • Understand use basic Java. Script syntax • Write text to a Web document using a Java. Script command Tutorial 1 New Perspectives on Java. Script, Comprehensive 2
![Objectives XP Understand the different data types supported by Java Script Declare Objectives XP • Understand the different data types supported by Java. Script • Declare](https://slidetodoc.com/presentation_image/1ea91ad403541a9b395627713be8f10a/image-3.jpg)
Objectives XP • Understand the different data types supported by Java. Script • Declare a variable and assign it a value • Reference a variable in a Java. Script statement • Create and call a Java. Script function Tutorial 1 New Perspectives on Java. Script, Comprehensive 3
![Objectives XP Access functions from an external Java Script file Document code Objectives XP • Access functions from an external Java. Script file • Document code](https://slidetodoc.com/presentation_image/1ea91ad403541a9b395627713be8f10a/image-4.jpg)
Objectives XP • Access functions from an external Java. Script file • Document code with multiline and single-line comments • Understand basic techniques for debugging Java. Script code Tutorial 1 New Perspectives on Java. Script, Comprehensive 4
![XP Staff Directory at Monroe Public Library Web Page Tutorial 1 New Perspectives on XP Staff Directory at Monroe Public Library Web Page Tutorial 1 New Perspectives on](https://slidetodoc.com/presentation_image/1ea91ad403541a9b395627713be8f10a/image-5.jpg)
XP Staff Directory at Monroe Public Library Web Page Tutorial 1 New Perspectives on Java. Script, Comprehensive 5
![Introduction to Java Script XP Spam Junk email Spammer Person Introduction to Java. Script XP • Spam – Junk e-mail • Spammer – Person](https://slidetodoc.com/presentation_image/1ea91ad403541a9b395627713be8f10a/image-6.jpg)
Introduction to Java. Script XP • Spam – Junk e-mail • Spammer – Person who sends spam • E-mail harvester – Program that scans documents looking for e-mail addresses Tutorial 1 New Perspectives on Java. Script, Comprehensive 6
![XP EMail Addresses in Staff Directory Tutorial 1 New Perspectives on Java Script Comprehensive XP E-Mail Addresses in Staff Directory Tutorial 1 New Perspectives on Java. Script, Comprehensive](https://slidetodoc.com/presentation_image/1ea91ad403541a9b395627713be8f10a/image-7.jpg)
XP E-Mail Addresses in Staff Directory Tutorial 1 New Perspectives on Java. Script, Comprehensive 7
![ServerSide and ClientSide Programming XP Serverside programming Program placed on server that Server-Side and Client-Side Programming XP • Server-side programming – Program placed on server that](https://slidetodoc.com/presentation_image/1ea91ad403541a9b395627713be8f10a/image-8.jpg)
Server-Side and Client-Side Programming XP • Server-side programming – Program placed on server that hosts Web site – Program then used to modify contents and structure of Web pages Tutorial 1 New Perspectives on Java. Script, Comprehensive 8
![ServerSide and ClientSide Programming XP Clientside programming Runs programs on users computer Server-Side and Client-Side Programming XP • Client-side programming – Runs programs on user’s computer](https://slidetodoc.com/presentation_image/1ea91ad403541a9b395627713be8f10a/image-9.jpg)
Server-Side and Client-Side Programming XP • Client-side programming – Runs programs on user’s computer – Programs likely to be more responsive to users – Can never completely replace server-side programming Tutorial 1 New Perspectives on Java. Script, Comprehensive 9
![ServerSide Programming Tutorial 1 New Perspectives on Java Script Comprehensive XP 10 Server-Side Programming Tutorial 1 New Perspectives on Java. Script, Comprehensive XP 10](https://slidetodoc.com/presentation_image/1ea91ad403541a9b395627713be8f10a/image-10.jpg)
Server-Side Programming Tutorial 1 New Perspectives on Java. Script, Comprehensive XP 10
![ClientSide Programming Tutorial 1 New Perspectives on Java Script Comprehensive XP 11 Client-Side Programming Tutorial 1 New Perspectives on Java. Script, Comprehensive XP 11](https://slidetodoc.com/presentation_image/1ea91ad403541a9b395627713be8f10a/image-11.jpg)
Client-Side Programming Tutorial 1 New Perspectives on Java. Script, Comprehensive XP 11
![XP Combining ClientSide and Server Side Programming Tutorial 1 New Perspectives on Java Script XP Combining Client-Side and Server. Side Programming Tutorial 1 New Perspectives on Java. Script,](https://slidetodoc.com/presentation_image/1ea91ad403541a9b395627713be8f10a/image-12.jpg)
XP Combining Client-Side and Server. Side Programming Tutorial 1 New Perspectives on Java. Script, Comprehensive 12
![XP The Development of Java Script Java Developed by Sun Microsystems XP The Development of Java. Script • Java – Developed by Sun Microsystems –](https://slidetodoc.com/presentation_image/1ea91ad403541a9b395627713be8f10a/image-13.jpg)
XP The Development of Java. Script • Java – Developed by Sun Microsystems – Programs designed to be run within Java interpreters – An example of a compiled language • Java. Script – Subset of Java – An interpreted language – Internet Explorer supports a version called JScript Tutorial 1 New Perspectives on Java. Script, Comprehensive 13
![XP Comparing Java and Java Script Tutorial 1 New Perspectives on Java Script Comprehensive XP Comparing Java and Java. Script Tutorial 1 New Perspectives on Java. Script, Comprehensive](https://slidetodoc.com/presentation_image/1ea91ad403541a9b395627713be8f10a/image-14.jpg)
XP Comparing Java and Java. Script Tutorial 1 New Perspectives on Java. Script, Comprehensive 14
![XP Versions of Java and Java Script Tutorial 1 New Perspectives on Java Script XP Versions of Java and Java. Script Tutorial 1 New Perspectives on Java. Script,](https://slidetodoc.com/presentation_image/1ea91ad403541a9b395627713be8f10a/image-15.jpg)
XP Versions of Java and Java. Script Tutorial 1 New Perspectives on Java. Script, Comprehensive 15
![XP Working with the Script Element Script element Used to enter scripts XP Working with the Script Element • Script element – Used to enter scripts](https://slidetodoc.com/presentation_image/1ea91ad403541a9b395627713be8f10a/image-16.jpg)
XP Working with the Script Element • Script element – Used to enter scripts into an HTML or XHTML file – Syntax <script type="mime-type"> script commands </script> Tutorial 1 New Perspectives on Java. Script, Comprehensive 16
![XP Writing Output to a Web Document Inserting cadlermpl gov in a Web XP Writing Output to a Web Document • Inserting cadler@mpl. gov in a Web](https://slidetodoc.com/presentation_image/1ea91ad403541a9b395627713be8f10a/image-17.jpg)
XP Writing Output to a Web Document • Inserting cadler@mpl. gov in a Web document <script type="text/javascript"> document. write("cadler@mpl. gov"); </script> Tutorial 1 New Perspectives on Java. Script, Comprehensive 17
![XP The document write Method One way to send output to the Web XP The document. write() Method • One way to send output to the Web](https://slidetodoc.com/presentation_image/1ea91ad403541a9b395627713be8f10a/image-18.jpg)
XP The document. write() Method • One way to send output to the Web document • Object – Can be any item, including mouse pointer or window scrollbars • Method – Process by which Java. Script manipulates the features of an object Tutorial 1 New Perspectives on Java. Script, Comprehensive 18
![XP Understanding Java Script Rules and the Use of White Space Java Script XP Understanding Java. Script Rules and the Use of White Space • Java. Script](https://slidetodoc.com/presentation_image/1ea91ad403541a9b395627713be8f10a/image-19.jpg)
XP Understanding Java. Script Rules and the Use of White Space • Java. Script – Is case sensitive – Ignores most occurrences of extra white space – Line breaks occurring within a statement can cause error – Good practice to not break a statement into several lines Tutorial 1 New Perspectives on Java. Script, Comprehensive 19
![Supporting NonJava Script Browsers XP noscript element Used by browsers that do Supporting Non-Java. Script Browsers XP • noscript element – Used by browsers that do](https://slidetodoc.com/presentation_image/1ea91ad403541a9b395627713be8f10a/image-20.jpg)
Supporting Non-Java. Script Browsers XP • noscript element – Used by browsers that do not support scripts – Syntax <noscript> alternative content </noscript> Tutorial 1 New Perspectives on Java. Script, Comprehensive 20
![Supporting NonJava Script Browsers XP CDATA section Marks text as data that Supporting Non-Java. Script Browsers XP • CDATA section – Marks text as data that](https://slidetodoc.com/presentation_image/1ea91ad403541a9b395627713be8f10a/image-21.jpg)
Supporting Non-Java. Script Browsers XP • CDATA section – Marks text as data that should not be processed by XHTML parsers – Syntax <script type="text/javascript"> <![cdata[ Java. Script code ]]> </script> Tutorial 1 New Perspectives on Java. Script, Comprehensive 21
![XP Working with Variables Variable A named item in a program that XP Working with Variables • Variable – A named item in a program that](https://slidetodoc.com/presentation_image/1ea91ad403541a9b395627713be8f10a/image-22.jpg)
XP Working with Variables • Variable – A named item in a program that stores information – Used to represent values and text strings – Values can change as the program runs Tutorial 1 New Perspectives on Java. Script, Comprehensive 22
![Declaring a Variable XP Tells Java Script interpreter to reserve memory space for Declaring a Variable XP • Tells Java. Script interpreter to reserve memory space for](https://slidetodoc.com/presentation_image/1ea91ad403541a9b395627713be8f10a/image-23.jpg)
Declaring a Variable XP • Tells Java. Script interpreter to reserve memory space for the variable • Statement to declare a variable; • Declaring three variables var em. Link, user. Name, em. Server; Tutorial 1 New Perspectives on Java. Script, Comprehensive 23
![Declaring a Variable XP Limits on variable names First character must be Declaring a Variable XP • Limits on variable names – First character must be](https://slidetodoc.com/presentation_image/1ea91ad403541a9b395627713be8f10a/image-24.jpg)
Declaring a Variable XP • Limits on variable names – First character must be either a letter or an underscore character ( _ ) – Remaining characters can be letters, numbers, or underscore characters – Variable names cannot contain spaces – Reserved words cannot be used Tutorial 1 New Perspectives on Java. Script, Comprehensive 24
![XP Assigning a Value to a Variable variable value Combining variable XP Assigning a Value to a Variable • variable = value; • Combining variable](https://slidetodoc.com/presentation_image/1ea91ad403541a9b395627713be8f10a/image-25.jpg)
XP Assigning a Value to a Variable • variable = value; • Combining variable declaration and assignment in a single statement var user. Name = "cadler", em. Server = "mpl. gov"; Tutorial 1 New Perspectives on Java. Script, Comprehensive 25
![Working with Data Types XP Data type Type of information stored in Working with Data Types XP • Data type – Type of information stored in](https://slidetodoc.com/presentation_image/1ea91ad403541a9b395627713be8f10a/image-26.jpg)
Working with Data Types XP • Data type – Type of information stored in a variable • Numeric value – Any number, such as 13, 22. 5, or -3. 14159 • Text string – Any group of text characters, such as “Hello” • Boolean value – Indicates the truth or falsity of a statement Tutorial 1 New Perspectives on Java. Script, Comprehensive 26
![XP Working with Data Types Null value Value has not yet been XP Working with Data Types • Null value – Value has not yet been](https://slidetodoc.com/presentation_image/1ea91ad403541a9b395627713be8f10a/image-27.jpg)
XP Working with Data Types • Null value – Value has not yet been assigned to variable • Weakly typed language – Variables are not strictly tied to specific data types • Strongly typed languages – Force programmer to explicitly identify a variable’s data type Tutorial 1 New Perspectives on Java. Script, Comprehensive 27
![XP Writing a Variable Value to a Web Document Variable Can be XP Writing a Variable Value to a Web Document • Variable – Can be](https://slidetodoc.com/presentation_image/1ea91ad403541a9b395627713be8f10a/image-28.jpg)
XP Writing a Variable Value to a Web Document • Variable – Can be used in place of value it contains • Writing a text string to a Web page var lib. Name = "Monroe Public Library"; document. write(lib. Name); • Plus symbol ( + ) – Can be used to combine variable with text string Tutorial 1 New Perspectives on Java. Script, Comprehensive 28
![XP Creating a Function to Perform an Action Functions Collection of commands XP Creating a Function to Perform an Action • Functions – Collection of commands](https://slidetodoc.com/presentation_image/1ea91ad403541a9b395627713be8f10a/image-29.jpg)
XP Creating a Function to Perform an Action • Functions – Collection of commands that perform an action or return a value – Include a function name – Include a set of commands that run when function is called – Some require parameters Tutorial 1 New Perspectives on Java. Script, Comprehensive 29
![XP Creating a Function to Perform an Action Syntax of a Java Script XP Creating a Function to Perform an Action • Syntax of a Java. Script](https://slidetodoc.com/presentation_image/1ea91ad403541a9b395627713be8f10a/image-30.jpg)
XP Creating a Function to Perform an Action • Syntax of a Java. Script function_name(parameters){ Java. Script commands } • Calling a function_name(parameter values) Tutorial 1 New Perspectives on Java. Script, Comprehensive 30
![XP Functions and Variable Scope Variable scope Indicates where and how the XP Functions and Variable Scope • Variable scope – Indicates where and how the](https://slidetodoc.com/presentation_image/1ea91ad403541a9b395627713be8f10a/image-31.jpg)
XP Functions and Variable Scope • Variable scope – Indicates where and how the variable can be used in your application – Can be local or global Tutorial 1 New Perspectives on Java. Script, Comprehensive 31
![XP Functions and Variable Scope Local scope Variable created within a Java XP Functions and Variable Scope • Local scope – Variable created within a Java.](https://slidetodoc.com/presentation_image/1ea91ad403541a9b395627713be8f10a/image-32.jpg)
XP Functions and Variable Scope • Local scope – Variable created within a Java. Script function • Global scope – Variables not declared within functions Tutorial 1 New Perspectives on Java. Script, Comprehensive 32
![XP Creating a Function to Return a Value For a function to return XP Creating a Function to Return a Value • For a function to return](https://slidetodoc.com/presentation_image/1ea91ad403541a9b395627713be8f10a/image-33.jpg)
XP Creating a Function to Return a Value • For a function to return a value – It must include a return statement • Syntax of a function that returns a value function_name(parameters) { Java. Script commands return value; } Tutorial 1 New Perspectives on Java. Script, Comprehensive 33
![XP Accessing an External Java Script File Common practice to Create libraries XP Accessing an External Java. Script File • Common practice to – Create libraries](https://slidetodoc.com/presentation_image/1ea91ad403541a9b395627713be8f10a/image-34.jpg)
XP Accessing an External Java. Script File • Common practice to – Create libraries of functions located in external files • Script elements that point to external files are – Placed in a document’s head section • Extension “. js” – Used by external files containing Java. Script commands and functions Tutorial 1 New Perspectives on Java. Script, Comprehensive 34
![Using an External Script Tutorial 1 New Perspectives on Java Script Comprehensive XP 35 Using an External Script Tutorial 1 New Perspectives on Java. Script, Comprehensive XP 35](https://slidetodoc.com/presentation_image/1ea91ad403541a9b395627713be8f10a/image-35.jpg)
Using an External Script Tutorial 1 New Perspectives on Java. Script, Comprehensive XP 35
![XP Commenting Java Script Code Comments Explain what your programs are designed XP Commenting Java. Script Code • Comments – Explain what your programs are designed](https://slidetodoc.com/presentation_image/1ea91ad403541a9b395627713be8f10a/image-36.jpg)
XP Commenting Java. Script Code • Comments – Explain what your programs are designed to do and how they work • Multiline comment /* The show. EM() function displays a link to the user’s e-mail address. The username and e-mail server name are entered in reverse order */ Tutorial 1 New Perspectives on Java. Script, Comprehensive 36
![Using Comments to Hide Java Script Code XP Syntax for hiding script script Using Comments to Hide Java. Script Code XP • Syntax for hiding script <script](https://slidetodoc.com/presentation_image/1ea91ad403541a9b395627713be8f10a/image-37.jpg)
Using Comments to Hide Java. Script Code XP • Syntax for hiding script <script type="text/javascript"> <!-- Hide from non-Java. Script browsers Java. Script commands // Stop hiding from older browsers --> </script> Tutorial 1 New Perspectives on Java. Script, Comprehensive 37
![Debugging Your Java Script Programs XP Loadtime error Occurs when script is Debugging Your Java. Script Programs XP • Load-time error – Occurs when script is](https://slidetodoc.com/presentation_image/1ea91ad403541a9b395627713be8f10a/image-38.jpg)
Debugging Your Java. Script Programs XP • Load-time error – Occurs when script is first loaded by Java. Script interpreter • Run-time error – Occurs after script has been successfully loaded and is being executed • Logical errors – Free from syntax and structural mistakes, but result in incorrect results Tutorial 1 New Perspectives on Java. Script, Comprehensive 38
![Displaying a Logical Error Tutorial 1 New Perspectives on Java Script Comprehensive XP 39 Displaying a Logical Error Tutorial 1 New Perspectives on Java. Script, Comprehensive XP 39](https://slidetodoc.com/presentation_image/1ea91ad403541a9b395627713be8f10a/image-39.jpg)
Displaying a Logical Error Tutorial 1 New Perspectives on Java. Script, Comprehensive XP 39
![Common Mistakes XP Debugging Process of searching code to locate a source Common Mistakes XP • Debugging – Process of searching code to locate a source](https://slidetodoc.com/presentation_image/1ea91ad403541a9b395627713be8f10a/image-40.jpg)
Common Mistakes XP • Debugging – Process of searching code to locate a source of trouble • Common errors – – Tutorial 1 Misspelling a variable name Mismatched parentheses or braces Mismatched quotes Missing quotes New Perspectives on Java. Script, Comprehensive 40
![XP Debugging Tools and Techniques Writing modular code Breaking up a programs XP Debugging Tools and Techniques • Writing modular code – Breaking up a program’s](https://slidetodoc.com/presentation_image/1ea91ad403541a9b395627713be8f10a/image-41.jpg)
XP Debugging Tools and Techniques • Writing modular code – Breaking up a program’s different tasks into smaller, more manageable chunks • Alert dialog box – Dialog box generated by Java. Script that displays a text message with an OK button • Microsoft Script Debugger – Can help to create and debug Java. Script programs Tutorial 1 New Perspectives on Java. Script, Comprehensive 41
![Microsoft Debugger Window Tutorial 1 New Perspectives on Java Script Comprehensive XP 42 Microsoft Debugger Window Tutorial 1 New Perspectives on Java. Script, Comprehensive XP 42](https://slidetodoc.com/presentation_image/1ea91ad403541a9b395627713be8f10a/image-42.jpg)
Microsoft Debugger Window Tutorial 1 New Perspectives on Java. Script, Comprehensive XP 42
![XP Tips for Writing Good Java Script Code Apply layout techniques to make XP Tips for Writing Good Java. Script Code • Apply layout techniques to make](https://slidetodoc.com/presentation_image/1ea91ad403541a9b395627713be8f10a/image-43.jpg)
XP Tips for Writing Good Java. Script Code • Apply layout techniques to make code more readable • Use descriptive variable names • Be consistent in how you apply uppercase and lowercase letters to your variable names • Add comments to your code Tutorial 1 New Perspectives on Java. Script, Comprehensive 43
![XP Tips for Writing Good Java Script Code Create customized functions Break XP Tips for Writing Good Java. Script Code • Create customized functions • Break](https://slidetodoc.com/presentation_image/1ea91ad403541a9b395627713be8f10a/image-44.jpg)
XP Tips for Writing Good Java. Script Code • Create customized functions • Break up long and complicated functions into smaller functions • Use the debugging tools available • In case of a logical error, use alert boxes Tutorial 1 New Perspectives on Java. Script, Comprehensive 44
Java script email
Informal email
Greasemonkey scripts
Script de java
Data types in javascript
Java script wikipedia
"java script"
"java script"
"java script"
Java script course
Java script
"java script"
Khan academy java programming
Java script examples
Inside which html element do we put
Java script ide
"java script"
Riad wahby
Java script classes
Java mail gmail
What is the purpose of a signal phrase
Introducing phonetics and phonology answer key
1941-1882
Quote analysis sentence starters
Argumentative essay counterclaim
Introduce yourself sample
How to introduce yourself in training session
Ma
Ottava rima poem examples
Introduction about digestive system
Introduction of company background
Opposite numbers definition
Mpls vpn internet access
Quote citation
Introducing new market offerings ppt
Templates for introducing quotations
Define upgrade advisor
Khdmdcm conversion
How to write a biography about myself
Relocation diffusion definition
Blood relation chart
The odyssey and epic poetry: an introduction, part 1
Exchange letter format
Carrying broker
Int family