当前位置:学会吧培训频道电脑知识学习网页制作移动WAP开发诺基亚XHTML常见问题问答» 正文

诺基亚XHTML常见问题问答

[08-08 00:47:59]   来源:http://www.xuehuiba.com  移动WAP开发   阅读:8919
概要:18 XHTML有强制元素吗?是的,所有的XHTML文件必须有一个DOCTYPE声明。<html>, <head> 和 <body>元素必须要呈现出来,并且<title>必须要在<head>元素的内部呈现出来。19 什么是XHTML Mobile Profile的文档类型定义(DTD)?DOCTYPE头部定义了XHTML Mobile Profile的Profile Formal Public Identifier,而且也可能包括XHTML Mobile Profile DTD的URL:<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN""http://www.wapforum.org/DTD/xhtml-mobile10.dtd">20 什么是XHTML Mobile Profile文档的MIME类型?XHTML Mobile
诺基亚XHTML常见问题问答,标签:移动WAP开发教程,wap网站开发,http://www.xuehuiba.com

18 XHTML有强制元素吗?
是的,所有的XHTML文件必须有一个DOCTYPE声明。<html>, <head> 和 <body>元素必须要呈现出来,并且<title>必须要在<head>元素的内部呈现出来。

19 什么是XHTML Mobile Profile的文档类型定义(DTD)?
DOCTYPE头部定义了XHTML Mobile Profile的Profile Formal Public Identifier,而且也可能包括XHTML Mobile Profile DTD的URL:
<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN"
"http://www.wapforum.org/DTD/xhtml-mobile10.dtd">

20 什么是XHTML Mobile Profile文档的MIME类型?
XHTML Mobile Profile文档没有单独的MIME媒体类型。然而,最受青睐的MIME类型是"application/xhtml+xml",它是用来为XHTML用户代理提供XHTML文档的。另一个可使用的MIME类型是“text/html”,但是它的使用范围应该仅限于已存在的HTML用户代理,以起到辅助的作用。当XHTML文档作为“text/html”使用后,其不会被当作XML进行处理,例如,用户代理不会检测结构错误。希望支持XHTML和HTML用户代理的作者,可以通过将HTML文档设置为“text/html”和将XHTML文档设置为“application/xhtml+xml”来充分利用内容协商机制。

21 如何链接WML和XHTML文档?
下面的范例说明了怎样在一个XHTML网页和WML卡片组之间创建链接:
--------------page1.xhtml---------------
<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN"
"http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>XHTML Mobile Profile page</title>
</head>
<body>
<h1>A link to a WML deck</h1>
<p>
<a href="deck1.wml#go">Link</a>
</p>
</body>
</html>
--------------deck1.wml------------------
<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.3//EN" "http://www.wapforum.org/DTD/wml13.dtd">
<wml>
<card id="go" title="WML deck1">
<p>
This is a WML deck. </p>
<p>
<anchor>Here <go href="page1.xhtml"/></anchor> </p>
<p>you can go back to the page.xhtml.</p>
</card>
</wml>

22 如何使用WTAI?
浏览器支持的WTAI公开函数库,可以直接用在XHTML网页中。例如,直接从XHTML网页中打电话的MakeCall函数,可以用如下的字符串定义。
<a href="wtai://wp/mc;+123456789">Call 123456 789</a>

23 如何在XHTML网么中使用WML事件?
事件概念对WML是独一无二的,但是,如“ontimer”事件可以用HTTP刷新来代替。WML事件也可以用来创建一个从XHTML网页到包括这个事件 的WML卡片的链接。

24 如何创建风格篇?
下面是一个可以和诺基亚XHTML浏览器一起使用的风格篇范例。注意它不包括所有定义的WCSS属性。
/*
* A sample style sheet for XHTML Mobile Profile
*/
body {font-weight:normal; font-size:medium; font-family: sans-serif}
p {margin-top:2px; margin-bottom:2px}
strong {font-weight:bold}
caption {text-align:center; font-weight:bold}
blink {text-decoration:blink}
li {color:black}
ol {list-style-type:decimal; margin-left:12px; margin-top:2px; margin-bottom:2px}
ul {list-style-type:disc; margin-left:12px; margin-bottom:2px; margin-top:2px}
table,tr {border-width:1px; border-style:solid; text-align:center}
td {align:right; valign:middle; border-width:1px; border-style:solid}
th {font-weight:bold; text-align:right}
hr {text-align:center; height:2px; width:100%; margin-top:2px; margin-bottom:2px}
h1 {font-weight:bold; font-size:11px; margin-top:2px; margin-bottom:2px}
h2 {font-size:11px; margin-top:2px; margin-bottom:2px; font-weight:normal}
h3 {font-weight:bold; font-size:9px; margin-top:2px; margin-bottom:2px}
h4 {font-size:9px; margin-top:2px; margin-bottom:2px; font-weight:normal}
h5 {font-weight:bold; font-size:8px; margin-top:2px; margin-bottom:2px}
h6 {font-size:8px; margin-top:2px; margin-bottom:2px; font-weight:normal}
input {margin:1px; border-style:solid; border-width:1px; padding:2px}
textarea {border-style:solid; border-width:1px}
select {margin:1px; border-style:solid; padding:2px}
.b {font-weight:bold}
.u {text-decoration:underline}
.big {font-size:larger}
.small {font-size:smaller}

25 风格篇是如何应用的?
1. 首先使用浏览器默认风格篇

上一页  [1] [2] [3]  下一页


Tag:移动WAP开发移动WAP开发教程,wap网站开发电脑知识学习 - 网页制作 - 移动WAP开发
《诺基亚XHTML常见问题问答》相关文章
Copyright 学会吧 All Right Reserved.
在线学习社区!--学会吧
1 2 3 4 5 6 7 7 8 9 10 11 12 13