JavaScript Bible, Gold Edition part 213

JavaScript Bible, Gold Edition part 213. 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. | CD-612 Part VI Appendixes indexA indexB NN2 NN3 NN4 NN6 IE3 J1 IE3 J2 IE4 IE5 Compatibility Example Listing 34-7 lets you experiment with a variety of values to see how the method works. If you are using Navigator 4 try changing the LANGUAGE attribute of the script to and see the different behavior when you set the parameters to 5 and 3. The parameters switch themselves essentially letting the second index value become the beginning of the extracted substring. Listing 34-7 Reading a Portion of a String HTML HEAD TITLE String Slicing and Dicing Part III TITLE SCRIPT LANGUAGE JavaScript var mainString Electroencephalograph function showResults var form 0 var paraml parseInt .value var param2 parseInt .value if param2 paraml else param1 param2 SCRIPT HEAD BODY onLoad showResults B String substr Method B HR Text used for the methods BR FONT SIZE 1 TT B Electroencephalograph BR ----5----5----5----5- B TT FONT TABLE BORDER 1 FORM TR TH String Method TH TH Method Parameters TH TH Results TH TR TR TD TD TD sfr ngOb Appendix F Examples from Parts III and IV CD-613 nbsp SELECT NAME param1 onChange showResults OPTION VALUE 0 0 OPTION VALUE 1 1 OPTION VALUE 2 2 OPTION VALUE 3 3 OPTION VALUE 5 5 SELECT SELECT NAME param2 onChange showResults OPTION None OPTION VALUE 3 3 OPTION VALUE 5 5 OPTION VALUE 10 10 SELECT nbsp TD TD INPUT TYPE text NAME result1 SIZE 25 TD TR FORM TABLE BODY HTML NN2 NN3 NN4 NN6 IE3 J1 IE3 J2 IE4 IE5 Compatibility Example You can use the toLowerCase and toUpperCase methods on literal strings as follows var newString HTTP .toLowerCase result http The methods are also helpful in comparing strings when case is not

Không thể tạo bản xem trước, hãy bấm tải xuống
TỪ KHÓA LIÊN QUAN
TÀI LIỆU MỚI ĐĂNG
16    68    2    31-05-2024
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.