tailieunhanh - O’Reilly Securing Ajax Applications phần 5

Nhưng với công nghệ web và kỹ thuật mới như Ajax và Flash đẩy trách nhiệm nhiều hơn vào khách hàng, trình duyệt không còn có thể được hoàn toàn bỏ qua. Hợp đồng thiết kế giữa người sử dụng và một trang web đang thay điệp SOAP có thể được chia thành bốn (4) các bộ phận chính: phong bì, tiêu đề, cơ thể, và lỗi. | XHTML differs from HTML in that Documents must be well formed. Elements must be properly nested. Elements and attribute names must be in lowercase. Attribute-value pairs must be explicitly defined. Attribute names must be in lowercase. Attribute values must be quoted. Attribute minimization is forbidden. Script and style elements should be enclosed in a Character Data CDATA section to avoid improper parsing. CDATA is information in a document that should not be parsed at all. This allows the use of the markup characters and within the jM text even though no elements or entities may appear in the section. CDATA declarations may appear in attributes and CDATA-marked sections may appear in documents. XHTML really doesn t look all that different than traditional HTML but it is much more useful. Because it conforms to specifications XHTML documents can bind with the browser s Document Object Model DOM thereby providing object level access to each element on the page. This access can then be utilized by components and scripts on the page to help render a more dynamic user experience. Example 3-12 shows an example of an XHTML file. Example 3-12. A sample XHTML file xml version encoding utf-8 DOCTYPE html PUBLIC - W3C DTD XHTML Strict EN http TR xhtml1 DTD html xmlns http 1999 xhtml xml lang en head title An XHTML file title style type text css h2 background-color white width 100 a font-size larger background-color blue a hover background-color gray example1 display none margin 3 padding 4 background-color yellow style script type text javascript -- CdAtA function changeDisplayState id d showhide e id if none block d. innerHTML Hide example else e. none 86 Chapter 3 Securing Web Technologies Download at Example 3-12. A sample XHTML file continued Show example _ _ _ -- script head body h2 How to