tailieunhanh - JavaScript Bible, Gold Edition part 115
JavaScript Bible, Gold Edition part 115. This book will bring programmers and non-technical professionals, including casual programmers and scripters, painlessly up to speed on all aspects of mastering JavaScript. Key topics include programming fundamentals, JavaScript language elements and how to use them effectively, and how to easily and efficiently add powerful new functionality to HTML documents and Java applets. | 988 Part IV JavaScript Core Language Reference first three digits of their . Social Security numbers and the state in which they registered with the agency. Arrays are the way JavaScript-enhanced pages can recreate the behavior of more sophisticated CGI programs on servers. When the collection of data you embed in the script is no larger than a typical .gif image file the user won t experience significant delays in loading your page yet he or she has the full power of your small database collection for instant searching without any calls back to the server. Such database-oriented arrays are important applications of JavaScript for what I call serverless CGIs. As you design an application look for clues as to potential application of arrays. If you have a number of objects or data points that interact with scripts the same way you have a good candidate for array structures. For example in every browser with the exception of Internet Explorer 3 you can assign like names to every text field in a column of an order form. In that sequence like-named objects are treated as elements of an array. To perform repetitive row calculations down an order form your scripts can use array syntax to perform all the extensions within a handful of JavaScript statements rather than perhaps dozens of statements hard-coded to each field name. Chapter 51 shows an example of this application. You can also create arrays that behave like the Java hash table a lookup table that gets you to the desired data point instantaneously if you know the name associated with the entry. If you can conceive your data in a table format an array is in your future. Creating an Empty Array Arrays are treated in JavaScript like objects but the extent to which your scripts can treat them as objects depends on whether you re using the first version of JavaScript in Navigator 2 and Internet Explorer 3 with the Version 1 JScript DLL or more recent versions in Navigator 3 or later and Internet Explorer with .
đang nạp các trang xem trước