TAILIEUCHUNG - THE BOOK OF JAVASCRIPT, 2ND EDITION phần 10

Dưới đây là giải pháp cho các bài tập tôi đã cho ở cuối mỗi chương. Các kịch bản và hình ảnh được sử dụng trong các giải pháp có thể được tìm thấy trên trang web đồng hành của cuốn sách này (http://www. ). JavaScript trong phụ lục này chứa những bình luận mà tôi nghĩ rằng giải thích là cần thiết. Nếu giải pháp của bạn làm việc và không nhiều thời gian hơn hơn so với tôi, bạn đã thực hiện một công việc tốt. Không có phân công cho Chương 1, vì vậy chúng tôi sẽ. | Example if isNaN -1 alert Get real You can t take the square root of -1 NEGATIVE_INFINITY FF IE 4 Read-only Value smaller than . You know no number will ever be less than this value. POSITIVE_INFINITY FF IE 4 Read-only Value bigger than . No number will ever exceed this value. Methods toExponential FF IE Displays the number in exponential notation. An integer parameter specifies the number of digits to the right of the decimal point. Example var the answer 4321 alert 2 The alert contains the string 3. toFixed FF IE Sets the number of digits following a decimal point. The number is rounded up if it has more trailing digits than n and 0 s are used after the decimal point if needed to create the desired decimal length. toPrecision FF IE Formats any number so it is of length n where n is an integer passed as a parameter. Also called significant digits. A decimal point and 0 s are used if needed to create the desired length. toString FF IE 3 Turns a number into a string Option The option object refers to an option in a select element of a form either a pull-down menu or scrollable list. All the options of a select element are stored in the options array of that element. Properties Form FF IE 3 Form containing the option selected FF IE 3 true if the option has been selected and false otherwise Example if 0 .selected true var the_option_text 0 .text alert thanks for picking the_option_teXt Reference to JavaScript Objects and Functions 435 text FF IE 3 Text associated with an option see the preceding example value FF IE 3 Value of the option parseInt FF IE 3 Converts a string to an integer as long as the first character is a number. If the first character is not a number parseInt returns NaN not a number . If the string is a number followed by letters parseInt grabs the first set of digits in the .

TỪ KHÓA LIÊN QUAN
TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã 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.