tailieunhanh - html5 designing rich internet applications visualizing the web phần 8

Âm thanh có thể được kiểm soát trong cách chính xác tương tự như video trong HTML5. Tận dụng các yếu tố AUDIO mới, bạn có thể nhúng các file âm thanh trực tiếp vào trang web của bạn. Một lần nữa, như với các yếu tố Video, quá trình nhúng âm thanh vào trang web của bạn là rất dễ dàng. Để nhúng âm thanh vào trang web của bạn bạn cần | 212 HTML5 JAVASCRIPT MODEL JavaScript as Programming Language Fortunately as programming languages go JavaScript is not too complicated to learn. By the time you get to the end of this section you will understand what is needed to write basic programs. There are two ways in which you can insert JavaScript into your web page Insert your JavaScript directly into your web page between two SCRIPT elements. Add your JavaScript to a text file and link the web page to the text file. To get started we will use SCRIPT elements on a page to separate the code. Later you will create separate files for your JavaScript. Following is a simple JavaScript file. html body script type text javascript Welcome to JavaScript script body html This is a normal web page with opening and closing HTML elements. Within the BODY element you can see the opening and closing SCRIPT element. You place your JavaScript code within the SCRIPT element. The SCRIPT element will default to JavaScript as a scripting language. There is however more than one scripting language you can use. A popular alternative to JavaScript is Microsoft s VBScript a version of the VB language in script format. VBScript is natively supported by Microsoft s Internet Explorer. Other web browsers can support VBScript through a plug-in. This next example JavaScript has one line of code Welcome to JavaScript The document is referencing an object. In this case the document object is the web page itself. The write script is a property of the document object that allows you to add code. Figure shows what your page will look like when you run this script. JavaScript can also be placed inside of the HEAD element of a page and executed by an event action. Event actions are driven when something happens. For instance when a web page loads you can add an event action called onLoad see Figure . The following is an example of inserting JavaScript into the HEAD element on the page. HTML5 JAVASCRIPT .

TÀI LIỆU LIÊN QUAN
TỪ KHÓA LIÊN QUAN
TÀI LIỆU MỚI ĐĂNG
31    225    0    29-03-2024
44    181    0    29-03-2024
20    241    2    29-03-2024
37    146    0    29-03-2024
1    102    1    29-03-2024
173    94    0    29-03-2024
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.