Đang chuẩn bị liên kết để tải về tài liệu:
Webmaster's Guide to the Wireless Internet part 18

Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ

Webmaster's Guide to the Wireless Internet part 18. The Webmaster’s Guide to the Wireless Internet provides the Wireless Webmaster with all of the tools necessary to build the next generation Internet. Packed with the essential information they need to design, develop, and secure robust, e-commerce enabled wireless Web sites. This book is written for advanced Webmasters who are experienced with conventional Web site design and are now faced with the challenge of creating sites that fit on the display of a Web enabled phone or PDA | 142 Chapter 4 Enhancing Client-Side Functionality with WMLScript Comments are either encapsulated within a pair of and or are preceded with the combination like this This is a block of comments that spans multiple lines This is a single line of comment This is another line of comment WMLScript 1.1 also reserves a set of keywords that have special meaning to the compiler.They are shown in Table 4.2. Table 4.2 Keywords in WMLScript access extern path agent for return break function typeof continue header url div http use div if user Domain isvalid var else meta while equiv name Examining WMLScript Data Types WMLScript supports five built-in data types Integer Floating Point String Boolean Invalid To declare a variable use the var keyword. There is no need to explicitly declare the data types WMLScript will handle them internally.The following illustrates how WMLScript automatically converts the variable to the appropriate data type www.syngress.com Enhancing Client-Side Functionality with WMLScript Chapter 4 143 var month 12 var price 5.95 var msg Hello World var printName true var except Invalid The Invalid type is used to differentiate itself from the other data types for example if 5 0 Invalid codes here Examining WMLScript Operators Similar to most programming languages WMLScript supports the sets of operators shown in Tables 4.3 4.4 4.5 4.6 and 4.7. Table 4.3 Assignment Operators Operator Description Assignment Add and then assign for example x y is equivalent to x x y - Subtract and then assign for example x - y is equivalent to x x - y Multiply and then assign for example x y is equivalent to x x y Divide and then assign for example x y is equivalent to x x y div Divide integer division and then assign for example x div y is equivalent to x x div y 9-_ Remainder the sign of the result is the same as the sign of the dividend and then assign for example x y is equivalent to x x y Bitwise left shift and then assign for example x y is equivalent to x x y Bitwise .