tailieunhanh - Khái quát về thiết kế web phần 5

function grade (math, english, science) { = math; = english; = science; } bobGrade = new grade(75,80,77); janeGrade = new grade(82,88,75); student1 = new student(“Bob”,10,bobGrade); | 53 function grade math english science math english science bobGrade new grade 75 80 77 janeGrade new grade 82 88 75 student1 new student Bob 10 bobGrade student2 new student Jane 9 janeGrade dùng ể lấy iểm Toán của studentl dùng lấy iểm môn Khoa học của student2 c. Thêm phương thức cho đối tượng function displayProfile Name BR Age BR Mother s Name BR Math Grade BR English Grade BR Science Grade BR function student name age mother grade name age grade mother displayProfile Ví dụ HTML HEAD TITLE Example TITLE SCRIPT LANGUAGE JavaScript -- HIDE FROM OTHER BROwSeRS DEFINE METHOD function displayInfo H1 Employee Profile H1 HR PRE Employee Number Social Security Number 54 Annual Salary PRE DEFINE OBJECT function employee prompt Enter Employee s Name Name prompt Enter Employee Number for 000-000 prompt Enter Social Security Number for 000-00-0000 prompt Enter Annual Salary for 00 000 displayInfo newEmployee new employee STOP HIDING FROM OTHER BROWSERS -- SCRIPT HEAD BODY SCRIPT LANGUAGE JavaScript -- HIDE FROM OTHER BROwSeRS STOp hiding FrOm other browsers -- SCRIPT BODY HTML Hình Form nhập tên nhân viên Hình Form nhập mức lương 55 Hình Form hiển thị kết quả Ví dụ HTML HEAD TITLE Example TITLE script LANGUAGE JavaScript -- Begin var day var month- var ampm- var ampmhour- var myweekday- var year- mydate new Date myday mymonth myweekday- .

TÀI LIỆU MỚI ĐĂNG
crossorigin="anonymous">
Đã 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.