مشخصات کتاب
-
liang yuxian eugene
-
2010
-
انگلیسی
-
31396
-
925
-
0
JavaScript Testing
دوره آموزش Javascript
Chapter 1: What is JavaScript Testing? 7
Where does JavaScript fit into the web page? 8
HTML Content 8
Time for action – building a HTML document 9
Styling HTML elements using its attributes 11
Specifying id and class name for an HTML element 12
Cascading Style Sheets 12
Time for action – styling your HTML document using CSS 14
Referring to an HTML element by its id or class name and styling it 18
Differences between a class selector and an id selector 19
Other uses for class selectors and id selectors 20
Complete list of CSS attributes 20
JavaScript providing behavior to a web page 20
Time for action – giving behavior to your HTML document 20
JavaScript Syntax 24
JavaScript events 26
Finding elements in a document 26
Putting it all together 28
The difference between JavaScript and server-side languages 29
Why pages need to work without JavaScript 30
What is testing? 31
Why do you need to test? 31
Types of errors 32
Loading errors 33
Time for action – loading errors in action 33
Partially correct JavaScript 34
Time for action – loading errors in action 35
Runtime errors 36
Time for action – runtime errors in action 36
Logic errors 37
Time for action – logic errors in action 38
Some advice for writing error-free JavaScript 40
Always check for proper names of objects, variables, and functions 40
Check for proper syntax 40
Plan before you code 40
Check for correctness as you code 40
Preventing errors by choosing a suitable text editor 41
Summary 41
Chapter 2: Ad Hoc Testing and Debugging in JavaScript 43
The purpose of ad hoc testing–getting the script to run 44
What happens when the browser encounters an error in JavaScript 44
Browser differences and the need to test in multiple browsers 45
Time for action – checking for features and sniffing browsers 46
Testing browser differences via capability testing 47
Time for action – capability testing for different browsers 48
Are you getting the correct output and putting values in the correct places? 50
Accessing the values on a form 50
Time for action – accessing values from a form 51
Another technique for accessing form values 54
Accessing other parts of the web page 55
Time for action – getting the correct values in the correct places 55
Does the script give the expected result 65
What to do if the script doesn't run? 65
Visually inspecting the code 66
Using alert() to see what code is running 66
Using alert() to see what values are being used 67
Time for action – using alert to inspect your code 67
A less obtrusive way to check what code is running and the values used 71
Time for action – unobtrusively checking what values are used 72
Commenting out parts of the script to simplify testing 75
Time for action – simplifying the checking process 76
Timing differences–making sure that the HTML is there before interacting with it 77
Why ad hoc testing is never enough 78
Summary 79
Chapter 3: Syntax Validation 81
The difference between validating and testing 82
Code that is valid but wrong–validation doesn't find all the errors 83
Code that is invalid but right 83
Code that is invalid and wrong–validation finds some errors that might
be difficult to spot any other way 83
ActionScript 3.0 Design Patterns
نویسنده: William B. Sanders and Chandima Cumaranatunge
زبان: انگلیسی