wap代码
<?xml version="1.0" encoding="gb2312"?> <!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 MP Document</title> <!-- 添加作者 --> <meta name="author" content="Sun Hui"/> <!-- 页面在客户端不缓存 --> <meta http-equiv="Cache-Control" content="no-cache"/> <!-- 文件被用户访问(请求)后的存活时间为 0 --> <meta http-equiv="Cache-Control" content="max-age=0"/> <!-- 元素10秒后告诉WAP浏览器URL --> <meta http-equiv="refresh" content="10;URL=http://mail.163.com/" /> <!-- Optional reference to external style sheet --> <link rel="stylesheet" href="style.css" type="text/css"/> <style type="text/css"> #bule {color:bule; background-color:#8aaf00; font-style: bold; } </style> </head> <body> <h1>Optional header</h1> <p class="box">Document contents go here</p> <br/> <marquee loop="0" direction="left" behavior="scroll" scrollamount="5" bgcolor="#ec994e" >这是循环滚动的字幕</marquee> <br/> <marquee loop="0" direction="right" behavior="alternate" scrollamount="5" id="bule" >这是来回滚动的字幕</marquee> <p id="red" style="font-style:italic;">Infomation:</p> <p> <form action="result.xhtml" method="get"> First Name: <input type="text" name="fname" title="First Name" style="-wap-input-required:true"/> <br/> <br/> ID: <input id="numinput" type="text" name="id" title="ID" /> <br/> <br/> <input type="submit" value="Submit" /> <input type="reset" value="Reset" /> </form> </p> <a href="help.xhtml" accesskey="5">Help</a> </body> </html>
style.css代码
h1 { font-style: italic;
background-color:#cceeff;
color:#48cfa7;
}
.box { margin: 1px;
padding: 1px;
border-width: 1px;
border-style:solid;
border-color:black;
background-color:#ccaaff;
text-align: center;}
#red {color:red;
background-color:#aaff00;
}
#numinput {-wap-input-format:"*N"}