Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1050721
  • 博文数量: 403
  • 博客积分: 10272
  • 博客等级: 上将
  • 技术积分: 4407
  • 用 户 组: 普通用户
  • 注册时间: 2012-02-24 14:22
文章分类

全部博文(403)

文章存档

2012年(403)

分类: 嵌入式

2012-03-02 12:58:14

作为开源的Android应用开发平台,Rexsee提供了接近2000个扩展API,不仅简化了Android原生开发,更支持Web开发者基于标准化Web开发模式,使用HTMLCSSJavascript快速实现移动应用。

Rexsee社区目前已提供了全部的扩展API说明与详细源码。

社区于年初推出在线开发服务,支持开发者在“项目中心”里在线创建并开发应用。同时更强化了应用的源码分享。

本文将细致讲述如何基于Rexsee项目中心,在线实现我们的第一个Hello World程序。

项目中心创建新项目

登录Rexsee社区,并进入项目中心( ),点击左侧头部的“创建新项目”即可开始咱们的Hello World应用创建。

1. 应用信息填写

a) 应用包名:程序的包名,英文字母开头,可以包含字母、数字和下划线。

b) 版本信息:应用的版本说明,使用数字和“.”,例如1.5

c) 应用名称:显示在手机应用程序列表和手机桌面上的名称,支持英文或中文。

d) 应用图标:显示在手机应用程序列表和手机桌面上的图标,72x72png图片。

2. 选择扩展组件

3. 基本设置与权限选择

Rexsee提供了大量的原生功能实现,你可以结合具体应用的功能在创建时进行勾选。

4. 分享

作为Rexsee项目中心最为重要的功能之一,社区鼓励开发者以开放的形式共享应用,更多的访问者不仅可以直接下载应用,更能从源码层面得以了解和学习。

系统默认为分享状态,即其他开发者可以在项目中心查看您的应用。

项目创建成功后即可进入到开发页面。在这里我们可以查看到应用的相关属性以及文件组成。

点击“编辑”index.html页面,开始咱们的Hello World

1. Hello World代码编写

index.html页面中输入如下代码

Html代码 复制代码 收藏代码
  1. <html>
  2. <head>
  3. <title>Rexsee Hello Worldtiltle>
  4. <script type=text/javascript>
  5. //Rexsee代码从这里开始
  6. window.onRexseeReady=function(){
  7. rexseeDialog.toast('系统加载完毕!');//出现后随即消失效果
  8. }
  9. script>
  10. head>
  11. <body>body>
  12. html>
Rexsee Hello World</tiltle> <script type=text/javascript> //Rexsee代码从这里开始 window.onRexseeReady=function(){ rexseeDialog.toast('系统加载完毕!');//出现后随即消失效果 } </script> </head> <body><script type="text/javascript" src="/js/jquery.qqFace.js"></script> </body> </html> <P style="TEXT-INDENT: 0cm; MARGIN: 0cm 0cm 7.8pt 18pt" class=ListParagraph><SPAN>代码说明:</SPAN></P> <P class=ListParagraph><SPAN style="FONT-FAMILY: Wingdings" lang=EN-US>l<SPAN> </SPAN></SPAN><SPAN lang=EN-US>Rexsee</SPAN><SPAN>提供的是</SPAN><SPAN lang=EN-US>JS API</SPAN><SPAN>,可以在</SPAN><SPAN lang=EN-US>html</SPAN><SPAN>中加入</SPAN><SPAN lang=EN-US><script type=text/javascript></script></SPAN><SPAN>标签;也可以在外部文件中添加</SPAN><SPAN lang=EN-US>JS</SPAN><SPAN>代码,然后通过</SPAN><SPAN lang=EN-US><script type=text/javascript src="</SPAN><SPAN>你的外部</SPAN><SPAN lang=EN-US>javascript</SPAN><SPAN>地址</SPAN><SPAN lang=EN-US>"></SPAN><SPAN>引用;</SPAN></P> <P class=ListParagraph><SPAN style="FONT-FAMILY: Wingdings" lang=EN-US>l<SPAN> </SPAN></SPAN><SPAN>本段代码中用到了</SPAN><SPAN lang=EN-US>window.onRexseeReady=function</SPAN><SPAN>(),当系统加载完毕后将会执行</SPAN><SPAN lang=EN-US>{}</SPAN><SPAN>中的</SPAN><SPAN lang=EN-US>JS</SPAN><SPAN>语句;</SPAN></P> <P class=ListParagraph><SPAN style="FONT-FAMILY: Wingdings" lang=EN-US>l<SPAN> </SPAN></SPAN><SPAN lang=EN-US>rexseeDialog.toast()</SPAN><SPAN>,这行代码执行时会弹出一个随即消失的对话框;</SPAN></P> <P class=ListParagraph><SPAN style="FONT-FAMILY: Wingdings" lang=EN-US>l<SPAN> </SPAN></SPAN><SPAN>更多详细的</SPAN><SPAN lang=EN-US>JS</SPAN><SPAN>对象和事件说明请在</SPAN><SPAN lang=EN-US>Rexsee</SPAN><SPAN>社区的“手册与源码”中获取,或者下载</SPAN><SPAN lang=EN-US>Rexsee</SPAN><SPAN>开发手册:</SPAN><SPAN lang=EN-US></SPAN></P> <P class=ListParagraph><SPAN style="FONT-FAMILY: Wingdings" lang=EN-US>n<SPAN> </SPAN></SPAN><SPAN>手机在线版手册:</SPAN><SPAN lang=EN-US></SPAN></P> <P class=ListParagraph><SPAN style="FONT-FAMILY: Wingdings" lang=EN-US>n<SPAN> </SPAN></SPAN><SPAN>手机本地版手册:</SPAN><SPAN lang=EN-US></SPAN></P> <P class=ListParagraph><STRONG><SPAN lang=EN-US>2.<SPAN> </SPAN></SPAN></STRONG><STRONG><SPAN>调试</SPAN></STRONG></P> <P class=ListParagraph><SPAN lang=EN-US>a)<SPAN> </SPAN></SPAN><SPAN>利用</SPAN><SPAN lang=EN-US>Rexsee</SPAN><SPAN>开发版进行调试</SPAN></P> <P style="MARGIN: 0cm 0cm 7.8pt 42pt" class=ListParagraph><SPAN lang=EN-US>Rexsee</SPAN><SPAN>开发版是一个专门用于调试</SPAN><SPAN lang=EN-US>Rexsee</SPAN><SPAN>应用的软件,在社区的快速入门中已经有所介绍。开发者可以访问如下链接,免费下载</SPAN><SPAN lang=EN-US>Rexsee</SPAN><SPAN>开发版,并安装在测试用的</SPAN><SPAN lang=EN-US>Android</SPAN><SPAN>手机,或者模拟器上。</SPAN></P> <P class=ListParagraph><SPAN style="FONT-FAMILY: Wingdings" lang=EN-US>l<SPAN> </SPAN></SPAN><SPAN lang=EN-US>Rexsee</SPAN><SPAN>开发版:</SPAN><SPAN lang=EN-US></SPAN></P> <P class=ListParagraph><SPAN style="FONT-FAMILY: Wingdings" lang=EN-US>l<SPAN> </SPAN></SPAN><SPAN lang=EN-US>Rexsee</SPAN><SPAN>模拟器(有点大):</SPAN><SPAN lang=EN-US></SPAN></P> <P style="MARGIN: 0cm 0cm 7.8pt 42pt" class=ListParagraph><SPAN>在开发版的“首页地址”中输入程序链接地址,即刚刚创建的</SPAN><SPAN lang=EN-US>index.html</SPAN><SPAN>页面地址,就可以看到程序效果。</SPAN></P> <P style="MARGIN-BOTTOM: 7.8pt" class=ListParagraph><SPAN lang=EN-US><IMG alt="" src=""> </SPAN><IMG alt="" src=""></P> <P class=ListParagraph><SPAN lang=EN-US>b)<SPAN> </SPAN></SPAN><SPAN>直接生成</SPAN><SPAN lang=EN-US>apk</SPAN><SPAN>应用程序</SPAN></P> <P style="MARGIN: 0cm 0cm 7.8pt 42pt" class=ListParagraph><SPAN>当然,这只是一个简单的应用示例,你大可直接编译生成</SPAN><SPAN lang=EN-US>apk</SPAN><SPAN>应用程序,安装并试用即可。(关于如何在线编译生成</SPAN><SPAN lang=EN-US>apk</SPAN><SPAN>将在下一章节进行说明。)</SPAN></P> <P class=ListParagraph><STRONG><SPAN lang=EN-US>3.<SPAN> </SPAN></SPAN></STRONG><STRONG><SPAN>进一步尝试</SPAN></STRONG></P> <P style="TEXT-INDENT: 0cm; MARGIN: 0cm 0cm 7.8pt 18pt" class=ListParagraph><SPAN>接下来,我们让这段代码变得复杂一些。</SPAN></P> <P class=ListParagraph><SPAN lang=EN-US>a)<SPAN> </SPAN></SPAN><SPAN>代码修改和提交</SPAN></P> <P style="TEXT-INDENT: 0cm; MARGIN: 0cm 0cm 7.8pt 39pt" class=ListParagraph><SPAN>进入我的项目,并点击“编辑”进入</SPAN><SPAN lang=EN-US>index.html</SPAN><SPAN>页面的修改中,将</SPAN><SPAN lang=EN-US>JS</SPAN><SPAN>代码调整为如下内容:</SPAN></P> <DIV class=dp-highlighter> <DIV class=bar> <DIV class=tools>Html代码 <A title=复制代码 href="http://rexsee.iteye.com/blog/1435184#"><IMG alt=复制代码 src="http://rexsee.iteye.com/images/icon_copy.gif"></A> <A title=收藏这段代码 href=".:void()"><IMG class=star alt=收藏代码 src="http://rexsee.iteye.com/images/icon_star.png"><IMG style="DISPLAY: none" class=spinner src="http://rexsee.iteye.com/images/spinner.gif"></A></DIV></DIV> <OL class=dp-xml> <LI><SPAN><SPAN>…… </SPAN></SPAN></LI> <LI><SPAN>//Rexsee代码从这里开始 </SPAN></LI> <LI><SPAN>rexseeTitleBar.setStyle('visibility:hidden;');//隐藏系统的标题栏 </SPAN></LI> <LI><SPAN>rexseeStatusBar.setStyle('visibility:hidden;');//隐藏系统的状态栏 </SPAN></LI> <LI><SPAN>var </SPAN><SPAN class=attribute>normalStyle</SPAN><SPAN> = </SPAN><SPAN class=attribute-value>""</SPAN><SPAN>; </SPAN></SPAN></LI> <LI><SPAN>normalStyle+="border-width:0;"; //边框宽度为零 </SPAN></LI> <LI><SPAN>normalStyle+="color:#FFFFFF;"; //色彩为白色 </SPAN></LI> <LI><SPAN>normalStyle+="background-color:#ffffff+#3399ff/0;";//从白色过渡到蓝色 </SPAN></LI> <LI><SPAN>normalStyle+="font-size:24;"; //字体大小为24 </SPAN></LI> <LI><SPAN>if (!rexseeMenu.exists('head')){ //设置头部标签栏菜单 </SPAN></LI> <LI><SPAN>rexseeMenu.create('head'); </SPAN></LI> <LI><SPAN>rexseeMenu.addItem('head','rexsee:','label:Rexsee Hello World;'+normalStyle); </SPAN></LI> <LI><SPAN>} </SPAN></LI> <LI><SPAN>if (!rexseeTabBars.exists('head')){ </SPAN></LI> <LI><SPAN>rexseeTabBars.create('head'); </SPAN></LI> <LI><SPAN>rexseeTabBars.setStyle('head','bar-position:top;padding:0px;'); </SPAN></LI> <LI><SPAN>} //设置头部标签栏 </SPAN></LI> <LI><SPAN>if (!rexseeMenu.exists('footer')){ //设置底部按钮栏菜单 </SPAN></LI> <LI><SPAN>rexseeMenu.create('footer'); </SPAN></LI> <LI><SPAN>rexseeMenu.addItem('footer','rexsee:','label:上一页;'); </SPAN></LI> <LI><SPAN>rexseeMenu.addItem('footer','rexsee:','label:下一页;'); </SPAN></LI> <LI><SPAN>rexseeMenu.addItem('footer','rexsee:','label:退出;'); </SPAN></LI> <LI><SPAN>} </SPAN></LI> <LI><SPAN>if (!rexseeButtonBars.exists('footer')){ //设置底部标签栏 </SPAN></LI> <LI><SPAN>rexseeButtonBars.create('footer'); </SPAN></LI> <LI><SPAN>rexseeButtonBars.setStyle('footer','bar-position:bottom;padding:5px;'); </SPAN></LI> <LI><SPAN>} </SPAN></LI> <LI><SPAN>…… </SPAN></LI></OL></DIV>…… //Rexsee代码从这里开始 rexseeTitleBar.setStyle('visibility:hidden;');//隐藏系统的标题栏 rexseeStatusBar.setStyle('visibility:hidden;');//隐藏系统的状态栏 var normalStyle = ""; normalStyle+="border-width:0;"; //边框宽度为零 normalStyle+="color:#FFFFFF;"; //色彩为白色 normalStyle+="background-color:#ffffff+#3399ff/0;";//从白色过渡到蓝色 normalStyle+="font-size:24;"; //字体大小为24 if (!rexseeMenu.exists('head')){ //设置头部标签栏菜单 rexseeMenu.create('head'); rexseeMenu.addItem('head','rexsee:','label:Rexsee Hello World;'+normalStyle); } if (!rexseeTabBars.exists('head')){ rexseeTabBars.create('head'); rexseeTabBars.setStyle('head','bar-position:top;padding:0px;'); } //设置头部标签栏 if (!rexseeMenu.exists('footer')){ //设置底部按钮栏菜单 rexseeMenu.create('footer'); rexseeMenu.addItem('footer','rexsee:','label:上一页;'); rexseeMenu.addItem('footer','rexsee:','label:下一页;'); rexseeMenu.addItem('footer','rexsee:','label:退出;'); } if (!rexseeButtonBars.exists('footer')){ //设置底部标签栏 rexseeButtonBars.create('footer'); rexseeButtonBars.setStyle('footer','bar-position:bottom;padding:5px;'); } …… <P style="TEXT-INDENT: 0cm; MARGIN: 0cm 0cm 7.8pt 39pt" class=ListParagraph><SPAN>代码说明:</SPAN></P> <P style="TEXT-INDENT: 0cm; MARGIN: 0cm 0cm 7.8pt 42pt" class=ListParagraph><SPAN>本段代码新增了标题栏以及菜单布局,一般有如下几个步骤完成:</SPAN></P> <P class=ListParagraph><SPAN lang=EN-US>1)<SPAN> </SPAN></SPAN><SPAN>隐藏系统的标题栏:</SPAN><SPAN lang=EN-US>rexseeTitleBar.setStyle('visibility:hidden;');</SPAN></P> <P class=ListParagraph><SPAN lang=EN-US>2)<SPAN> </SPAN></SPAN><SPAN>判断某个标题栏是否存在,标题栏创建之后在整个应用中会一直存在,所以在创建的时候需要判断,是否已经存在过此标题栏,防止重复创建:</SPAN></P> <P style="MARGIN: 0cm 0cm 7.8pt 42pt" class=ListParagraph><SPAN lang=EN-US>if (!rexseeMenu.exists('head')) //</SPAN><SPAN>设置头部标签栏菜单</SPAN></P> <P class=ListParagraph><SPAN lang=EN-US>3)<SPAN> </SPAN></SPAN><SPAN>创建一个标签栏,作为标签栏菜单:</SPAN><SPAN lang=EN-US>rexseeMenu.create('head'); </SPAN></P> <P class=ListParagraph><SPAN lang=EN-US>4)<SPAN> </SPAN></SPAN><SPAN>向标签栏菜单中添加标签:</SPAN></P> <P style="MARGIN: 0cm 0cm 7.8pt 42pt" class=ListParagraph><SPAN lang=EN-US>rexseeMenu.addItem('head','rexsee:','label:Rexsee Hello World;'+normalStyle);</SPAN></P> <P style="TEXT-INDENT: 0cm; MARGIN: 0cm 0cm 7.8pt 42pt" class=ListParagraph><SPAN lang=EN-US></SPAN></P> <P style="TEXT-INDENT: 0cm; MARGIN: 0cm 0cm 7.8pt 42pt" class=ListParagraph><SPAN lang=EN-US></SPAN><SPAN>按如下图片示意中,点击“提交”即可更新页面代码。</SPAN></P> <P style="TEXT-INDENT: 0cm; MARGIN: 0cm 0cm 7.8pt 42pt" class=ListParagraph><IMG alt="" src=""></P> <P style="MARGIN: 0cm 0cm 7.8pt 42pt" class=ListParagraph><SPAN>和之前介绍的调试方法一致,打开开发版,无需重新载入首页地址,直接刷新即可打开调整后的应用。</SPAN></P> <P style="TEXT-INDENT: 0cm; MARGIN: 0cm 0cm 7.8pt 42pt" class=ListParagraph><SPAN lang=EN-US><IMG alt="" src=""></SPAN></P> <SPAN>应用程序</SPAN> <P style="TEXT-INDENT: 0cm; MARGIN-BOTTOM: 7.8pt" class=ListParagraph><SPAN lang=EN-US></SPAN><SPAN>在代码编写完成之后,点击项目右上角的“编译”按钮。</SPAN></P> <P style="TEXT-INDENT: 0cm; MARGIN-BOTTOM: 7.8pt" class=ListParagraph><IMG alt="" src=""></P> <P style="TEXT-INDENT: 0cm; MARGIN-BOTTOM: 7.8pt" class=ListParagraph><SPAN lang=EN-US></SPAN><SPAN>系统将在线为你编译生成</SPAN><SPAN lang=EN-US>apk</SPAN><SPAN>应用程序。</SPAN></P> <P style="TEXT-INDENT: 0cm; MARGIN-BOTTOM: 7.8pt" class=ListParagraph><IMG alt="" src=""></P> <P style="TEXT-INDENT: 0cm; MARGIN-BOTTOM: 7.8pt" class=ListParagraph><SPAN lang=EN-US></SPAN><SPAN>编译成功后,你可以获得一个</SPAN><SPAN lang=EN-US>apk</SPAN><SPAN>下载地址,以及二维码图形。</SPAN></P> <P style="TEXT-INDENT: 0cm; MARGIN-BOTTOM: 7.8pt" class=ListParagraph><IMG alt="" src=""></P> <P style="MARGIN-BOTTOM: 7.8pt" class=ListParagraph><SPAN>点击“返回项目”,你可以将此应用提交到</SPAN><SPAN lang=EN-US>Rexsee</SPAN><SPAN>应用市场,或通过别的第三方应用市场发布并推广你的应用。</SPAN></P> <P style="MARGIN-BOTTOM: 7.8pt" class=ListParagraph><IMG alt="" src=""></P> <P style="MARGIN-BOTTOM: 7.8pt" class=ListParagraph><SPAN>直接向你的用户分发你在上面生成的</SPAN><SPAN lang=EN-US>Rexsee</SPAN><SPAN>客户端即可。你的用户安装后,运行该客户端会直接跳转到你的应用首页。</SPAN></P> <P style="MARGIN-BOTTOM: 7.8pt" class=ListParagraph><SPAN>到此,一个</SPAN> <SPAN lang=EN-US>Android</SPAN><SPAN>应用就完成了,对你而言,就是在上线一个普通网站。</SPAN></P> <P class=ListParagraph><SPAN style="FONT-FAMILY: Wingdings" lang=EN-US>l<SPAN> </SPAN></SPAN><SPAN>客户端升级</SPAN> </P> <P class=ListParagraph><SPAN style="FONT-FAMILY: Wingdings" lang=EN-US>n<SPAN> </SPAN></SPAN><SPAN>如果你需要进行业务调整,需要重新设计客户端的界面,直接修改</SPAN><SPAN lang=EN-US>index</SPAN><SPAN>页面即可。</SPAN><SPAN lang=EN-US> </SPAN></P> <P class=ListParagraph><SPAN style="FONT-FAMILY: Wingdings" lang=EN-US>n<SPAN> </SPAN></SPAN><SPAN>如果你需要更改客户端的样式,只需维护相关的样式表即可。</SPAN><SPAN lang=EN-US> </SPAN></P> <P class=ListParagraph><SPAN style="FONT-FAMILY: Wingdings" lang=EN-US>l<SPAN> </SPAN></SPAN><SPAN>通常情况下,你不需要更新(重新搬移)</SPAN><SPAN lang=EN-US>Rexsee</SPAN><SPAN>应用客户端。除非:</SPAN><SPAN lang=EN-US> </SPAN></P> <P class=ListParagraph><SPAN style="FONT-FAMILY: Wingdings" lang=EN-US>n<SPAN> </SPAN></SPAN><SPAN>需要更改</SPAN><SPAN lang=EN-US>Rexsee</SPAN><SPAN>程序图标或者程序相关信息等。</SPAN><SPAN lang=EN-US> </SPAN></P> <P class=ListParagraph><SPAN style="FONT-FAMILY: Wingdings" lang=EN-US>n<SPAN> </SPAN></SPAN><SPAN>需要更改</SPAN><SPAN lang=EN-US>Rexsee</SPAN><SPAN>客户端的首页地址。</SPAN><SPAN lang=EN-US> </SPAN></P> <P class=ListParagraph><SPAN style="FONT-FAMILY: Wingdings" lang=EN-US>n<SPAN> </SPAN></SPAN><SPAN>需要增加</SPAN><SPAN lang=EN-US>Rexsee</SPAN><SPAN>域白名单记录等软件许可。</SPAN><SPAN lang=EN-US> </SPAN></P> <P class=ListParagraph><SPAN style="FONT-FAMILY: Wingdings" lang=EN-US>n<SPAN> </SPAN></SPAN><SPAN lang=EN-US>Rexsee</SPAN><SPAN>平台提供了新功能或者修复了一些</SPAN><SPAN lang=EN-US>Bug</SPAN><SPAN>。</SPAN><SPAN lang=EN-US> </SPAN></P> <P style="MARGIN-BOTTOM: 7.8pt" class=ListParagraph><SPAN>或者,你也可以在本地进行开发,利用</SPAN><SPAN lang=EN-US>Rexsee</SPAN><SPAN>的在线编译实现应用,而非使用项目中心的在线开发服务。</SPAN></P> <P style="MARGIN-BOTTOM: 7.8pt" class=ListParagraph><SPAN>你只需将上面示例中的代码编写为</SPAN><SPAN lang=EN-US>index.html</SPAN><SPAN>文件,然后打包为</SPAN><SPAN lang=EN-US>zip</SPAN><SPAN>格式文件。点击如下链接进入</SPAN><SPAN lang=EN-US>Rexsee</SPAN><SPAN>社区的“在线编译”频道。</SPAN></P> <P style="MARGIN-BOTTOM: 7.8pt" class=ListParagraph><SPAN>相关的信息与之前的介绍一致,唯一需要注意的是“高级设置”中的“预打包”处理。</SPAN></P> <P style="MARGIN-BOTTOM: 7.8pt" class=ListParagraph><IMG alt="" src=""></P> <P style="MARGIN-BOTTOM: 7.8pt" class=ListParagraph><STRONG><SPAN>说明:</SPAN></STRONG><SPAN>理论上你可以把除了后台代码之外的东西都打包到</SPAN><SPAN lang=EN-US>zip</SPAN><SPAN>包里,比如一些图片,音视频文件,或者</SPAN><SPAN lang=EN-US>html</SPAN><SPAN>的框架文件,</SPAN><SPAN lang=EN-US>css</SPAN><SPAN>文件,</SPAN><SPAN lang=EN-US>js</SPAN><SPAN>文件。但实际操作下,考虑到安全、网络速度、流量、体验,需要根据项目来安排。</SPAN></P> <P style="TEXT-INDENT: 0cm; MARGIN: 0cm 0cm 7.8pt 21pt" class=ListParagraph><SPAN>提交后即可生成</SPAN><SPAN lang=EN-US>apk</SPAN><SPAN>应用程序,分发与运维流程与之前的介绍一致。</SPAN></P> <P style="TEXT-INDENT: 0cm; MARGIN-BOTTOM: 7.8pt" class=ListParagraph><SPAN lang=EN-US>Rexsee</SPAN><SPAN>是国内开源的</SPAN><SPAN lang=EN-US>Android</SPAN><SPAN>应用开发平台:</SPAN></P> <P class=ListParagraph><SPAN style="FONT-FAMILY: Wingdings" lang=EN-US>l<SPAN> </SPAN></SPAN><SPAN>以</SPAN><SPAN lang=EN-US>Webkit</SPAN><SPAN>为内核,使用标准化</SPAN><SPAN lang=EN-US>Web</SPAN><SPAN>开发模式实现应用;</SPAN></P> <P class=ListParagraph><SPAN style="FONT-FAMILY: Wingdings" lang=EN-US>l<SPAN> </SPAN></SPAN><SPAN>强化</SPAN><SPAN lang=EN-US>HTML5</SPAN><SPAN>在浏览器之外的高度交互特性;</SPAN></P> <P class=ListParagraph><SPAN style="FONT-FAMILY: Wingdings" lang=EN-US>l<SPAN> </SPAN></SPAN><SPAN>扩展接近</SPAN><SPAN lang=EN-US>2000</SPAN><SPAN>个</SPAN><SPAN lang=EN-US>API</SPAN><SPAN>,深度支持</SPAN><SPAN lang=EN-US>Android</SPAN><SPAN>系统平台;</SPAN></P> <P class=ListParagraph><SPAN style="FONT-FAMILY: Wingdings" lang=EN-US>l<SPAN> </SPAN></SPAN><SPAN>覆盖</SPAN><SPAN lang=EN-US>95%</SPAN><SPAN>的</SPAN><SPAN lang=EN-US>Android</SPAN><SPAN>原生功能,支持原生</SPAN><SPAN lang=EN-US>UI</SPAN><SPAN>布局,媲美原生应用体验;</SPAN></P> <P class=ListParagraph><SPAN style="FONT-FAMILY: Wingdings" lang=EN-US>l<SPAN> </SPAN></SPAN><SPAN>符合</SPAN><SPAN lang=EN-US>W3C</SPAN><SPAN>标准,完全兼容第三方开发框架;</SPAN></P> <P class=ListParagraph><SPAN style="FONT-FAMILY: Wingdings" lang=EN-US>l<SPAN> </SPAN></SPAN><SPAN>提供本地应用与云端应用的不同运行形态。</SPAN></P> <P style="TEXT-INDENT: 0cm; MARGIN-BOTTOM: 7.8pt" class=ListParagraph><SPAN>详细信息以及更多开发文档请访问:</SPAN><SPAN lang=EN-US></SPAN></P></DIV> </div> <!-- <div class="Blog_con3_1">管理员在2009年8月13日编辑了该文章文章。</div> --> <div class="Blog_con2_1 Blog_con3_2"> <div> <!--<img src="/image/default/tu_8.png">--> <!-- JiaThis Button BEGIN --> <div class="bdsharebuttonbox"><A class=bds_more href="#" data-cmd="more"></A><A class=bds_qzone title=分享到QQ空间 href="#" data-cmd="qzone"></A><A class=bds_tsina title=分享到新浪微博 href="#" data-cmd="tsina"></A><A class=bds_tqq title=分享到腾讯微博 href="#" data-cmd="tqq"></A><A class=bds_renren title=分享到人人网 href="#" data-cmd="renren"></A><A class=bds_weixin title=分享到微信 href="#" data-cmd="weixin"></A></div> <script>window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"2","bdMiniList":false,"bdPic":"","bdStyle":"0","bdSize":"16"},"share":{}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];</script> <!-- JiaThis Button END --> </div> 阅读(2475) | 评论(1) | 转发(0) | <div class="HT_line3"></div> </div> <div class="Blog_con3_3"> <div><span id='digg_num'>0</span><a href="javascript:void(0)" id='digg' bid='3088006' url='/blog/digg.html' ></a></div> <p>上一篇:<a href="/uid-26727976-id-3088002.html">有关Android发送E-mail</a></p> <p>下一篇:<a href="/uid-26727976-id-3088011.html">iPad : 时间碎片杀手</a></p> </div> </div> <!-- <div class="Blog_con3_4 Blog_con3_5"> <div class="Blog_tit2 Blog_tit7">热门推荐</div> <ul> <li><a href="" title="" target='blank' ></a></li> </ul> </div> --> </div> </div> <div class="Blog_right1_7" id='replyList'> <div class="Blog_tit3">给主人留下些什么吧!~~</div> <!--不包含引用--> <div class="Blog_right1_8"> <div class="Blog_right_img1"><a href='/uid/17271153.html' ><img src="http://account.chinaunix.net/api/avatar.php?uid=17271153" /></a></div> <div class="Blog_right_font1"> <p class="Blog_p5"><span><a href='/uid/17271153.html' ><span>我要去水立方</span></a></span>2012-03-03 08:33:55</p> <p class="Blog_p6">Rexsee平台好强大<img src="/image/face/1.gif" ></p> <div class="div1"><a href="javascript:void(0);" class="Blog_a10" toid='17271153' bid='3088006' cid='563794' tname='我要去水立方'>回复</a> | <a href="javascript:;" onclick="link(this);showErrorMsg('操作失败,您需要先登录!', '消息提示', 'http://account.chinaunix.net/login');" class='box_report'>举报</a></div> <!-- 评论占位框--> <div class='z_move_comment' style='display:none'> </div> </div> <div class="Blog_line1"></div> </div> <!-- 评论分页--> <div class="Blog_right1_6 Blog_right1_12"> </div> <!-- 评论分页--> <div class="Blog_right1_10" style="display:none"> <div class="Blog_tit3">评论热议</div> <!--未登录 --> <div class="Blog_right1_8"> <div class="nologin_con1"> 请登录后评论。 <p><a href="http://account.chinaunix.net/login" onclick="link(this)">登录</a> <a href="http://account.chinaunix.net/register?url=http%3a%2f%2fblog.chinaunix.net">注册</a></p> </div> </div> </div> <div style="text-align:center;margin-top:10px;"> <script type="text/javascript" smua="d=p&s=b&u=u3118759&w=960&h=90" src="//www.nkscdn.com/smu0/o.js"></script> </div> </div> </div> </div> <input type='hidden' id='report_url' value='/blog/ViewReport.html' /> <script type="text/javascript"> //测试字符串的长度 一个汉字算2个字节 function mb_strlen(str) { var len=str.length; var totalCount=0; for(var i=0;i<len;i++) { var c = str.charCodeAt(i); if ((c >= 0x0001 && c <= 0x007e) || (0xff60<=c && c<=0xff9f)) { totalCount++; }else{ totalCount+=2; } } return totalCount; } /* var Util = {}; Util.calWbText = function (text, max){ if(max === undefined) max = 500; var cLen=0; var matcher = text.match(/[^\x00-\xff]/g), wlen = (matcher && matcher.length) || 0; //匹配url链接正则 http://*** var pattern = /http:\/\/([\w-]+\.)+[\w-]+(\/*[\w-\.\/\?%&=][^\s^\u4e00-\u9fa5]*)?/gi; //匹配的数据存入数组 var arrPt = new Array(); var i = 0; while((result = pattern.exec(text)) != null){ arrPt[i] = result[0]; i++; } //替换掉原文本中的链接 for(var j = 0;j<arrPt.length;j++){ text = text.replace(arrPt[j],""); } //减掉链接所占的长度 return Math.floor((max*2 - text.length - wlen)/2 - 12*i); }; */ var allowComment = '0'; //举报弹出层 function showJuBao(url, cid){ $.cover(false); asyncbox.open({ id : 'report_thickbox', url : url, title : '举报违规', width : 378, height : 240, scroll : 'no', data : { 'cid' : cid, 'idtype' : 2 , 'blogurl' : window.location.href }, callback : function(action){ if(action == 'close'){ $.cover(false); } } }); } $(function(){ //创建管理员删除的弹出层 $('#admin_article_del').click(function(){ $.cover(false); asyncbox.open({ id : 'class_thickbox', html : '<div class="HT_layer3_1"><ul><li class="HT_li1">操作原因:<select class="HT_sel7" id="del_type" name="del_type"><option value="广告文章">广告文章</option><option value="违规内容">违规内容</option><option value="标题不明">标题不明</option><option value="文不对题">文不对题</option></select></li><li class="HT_li1" ><input class="HT_btn4" id="admin_delete" type="button" /></li></ul></div>', title : '选择类型', width : 300, height : 150, scroll : 'no', callback : function(action){ if(action == 'close'){ $.cover(false); } } }); }); $('#admin_delete').live('click' , function(){ ///blog/logicdel/id/3480184/url/%252Fblog%252Findex.html.html var type = $('#del_type').val(); var url = '/blog/logicdel/id/3088006/url/%252Fuid%252F26727976.html.html'; window.location.href= url + '?type=' + type; }); //顶 js中暂未添加&过滤 $('#digg').live('click' , function(){ if(isOnLine == '' ) { //showErrorMsg('登录之后才能进行此操作' , '消息提示'); showErrorMsg('操作失败,您需要先登录!', '消息提示', 'http://account.chinaunix.net/login'); return false; } var bid = $('#digg').attr('bid'); var url = $('#digg').attr('url'); var digg_str = $.cookie('digg_id'); if(digg_str != null) { var arr= new Array(); //定义一数组 arr = digg_str.split(","); //字符分割 for( i=0 ; i < arr.length ; i++ ) { if(bid == arr[i]) { showErrorMsg('已经赞过该文章', '消息提示'); return false; } } } $.ajax({ type:"POST", url:url, data: { 'bid' : bid }, dataType: 'json', success:function(msg){ if(msg.error == 0) { var num = parseInt($('#digg_num').html(),10); num += 1; $('#digg_num').html(num); $('#digg').die(); if(digg_str == null) { $.cookie('digg_id', bid, {expires: 30 , path: '/'}); } else { $.cookie('digg_id', digg_str + ',' + bid, {expires: 30 , path: '/'}); } showSucceedMsg('谢谢' , '消息提示'); } else if(msg.error == 1) { //showErrorMsg(msg.error_content , '消息提示'); showErrorMsg('操作失败,您需要先登录!', '消息提示', 'http://account.chinaunix.net/login'); } else if(msg.error == 2) { showErrorMsg(msg.error_content , '消息提示'); } } }); }); //举报弹出层 /*$('.box_report').live('click' , function(){ if(isOnLine == '' ) { //showErrorMsg('登录之后才能进行此操作' , '消息提示'); showErrorMsg('操作失败,您需要先登录!', '消息提示', 'http://account.chinaunix.net/login'); return false; } var url = $('#report_url').val(); var cid = $(this).attr('cid'); $.cover(false); asyncbox.open({ id : 'report_thickbox', url : url, title : '举报违规', width : 378, height : 240, scroll : 'no', data : { 'cid' : cid, 'idtype' : 2 }, callback : function(action){ if(action == 'close'){ $.cover(false); } } }); });*/ //评论相关代码 //点击回复显示评论框 $('.Blog_a10').live('click' , function(){ if(isOnLine == '' ) { //showErrorMsg('登录之后才能进行此操作' , '消息提示'); showErrorMsg('操作失败,您需要先登录!', '消息提示', 'http://account.chinaunix.net/login'); return false; } if(allowComment == 1) { showErrorMsg('该博文不允许评论' , '消息提示'); return false; } var tid = $(this).attr('toid');//留言作者id var bid = $(this).attr('bid');//blogid var cid = $(this).attr('cid');//留言id var tname = $(this).attr('tname'); var tpl = '<div class="Blog_right1_9">'; tpl += '<div class="div2">'; tpl += '<textarea name="" cols="" rows="" class="Blog_ar1_1" id="rmsg">文明上网,理性发言...</textarea>'; tpl += '</div>'; tpl += '<div class="div3">'; tpl += '<div class="div3_2"><a href="javascript:void(0);" class="Blog_a11" id="quota_sbumit" url="/Comment/PostComment.html" tid="'+tid+'" bid="'+bid+'" cid="'+cid+'" tname="'+tname+'" ></a><a href="javascript:void(0)" id="qx_comment" class="Blog_a12"></a></div>'; tpl += '<div class="div3_1"><a href="javascript:void(0);" id="mface"><span></span>表情</a></div>'; tpl += '<div class="clear"></div>'; tpl += '</div>'; tpl += '</div>'; $('.z_move_comment').html(''); $(this).parents('.Blog_right1_8').find('.z_move_comment').html(tpl).show(); }); //引用的评论提交 $('#quota_sbumit').live('click' , function(){ if(isOnLine == '' ) { //showErrorMsg('登录之后才能进行此操作' , '消息提示'); showErrorMsg('操作失败,您需要先登录!', '消息提示', 'http://account.chinaunix.net/login'); return false; } var bid = $(this).attr('bid'); var tid = $(this).attr('tid');//被引用人的id var qid = $(this).attr('cid');//引用的id var url = $(this).attr('url'); var text = $('#rmsg').val(); var tname = $(this).attr('tname'); if(text == '' || text=='文明上网,理性发言...') { showErrorMsg('评论内容不能为空!' , '消息提示'); return false; } else { if(mb_strlen(text) > 1000){ showErrorMsg('评论内容不能超过500个汉字' , '消息提示'); return false; } } $.ajax({ type: "post", url: url , data: {'bid': bid , 'to' : tid , 'qid' : qid , 'text': text , 'tname' : tname }, dataType: 'json', success: function(data){ if(data.code == 1){ var tpl = '<div class="Blog_right1_8">'; tpl+= '<div class="Blog_right_img1"><a href="' +data.info.url+ '" >' + data.info.header + '</a></div>'; tpl+= '<div class="Blog_right_font1">'; tpl+= '<p class="Blog_p5"><span><a href="' +data.info.url+ '" >' + data.info.username + '</a></span>' + data.info.dateline + '</p>'; tpl+= '<p class="Blog_p7"><a href="' + data.info.quota.url + '">' + data.info.quota.username + '</a>:'+ data.info.quota.content + '</p>'; tpl+= '<p class="Blog_p8">' + data.info.content + '</p><span class="span_text1"><a href="javascript:void(0);" class="Blog_a10" toid=' + data.info.fuid + ' bid=' + data.info.bid + ' cid=' + data.info.cid + ' tname = ' + data.info.username + ' >回复</a> |  <a class="comment_del_mark" style="cursor:pointer" url="' + data.info.delurl + '" >删除</a> |  <a href="javascript:showJuBao(\'/blog/ViewReport.html\','+data.info.cid+')" class="box_report" cid="' + data.info.cid + '" >举报</a></span></div>'; tpl+= '<div class="z_move_comment" style="display:none"></div>'; tpl+= '<div class="Blog_line1"></div></div>'; $('#replyList .Blog_right1_8:first').before(tpl); $('.z_move_comment').html('').hide(); } else if(data.code == -1){ //showErrorMsg(data.info , '消息提示'); showErrorMsg('操作失败,您需要先登录!', '消息提示', 'http://account.chinaunix.net/login'); } }, error: function(){//请求出错处理 } }); }); //底部发表评论 $('#submitmsg').click(function(){ if(allowComment == 1) { showErrorMsg('该博文不允许评论' , '消息提示'); return false; } var bid = $(this).attr('bid'); var toid = $(this).attr('toid'); var text = $('#reply').val(); var url = $(this).attr('url'); if(text == '' || text=='文明上网,理性发言...') { showErrorMsg('评论内容不能为空!' , '消息提示'); return false; } else { if(mb_strlen(text) > 1000){ showErrorMsg('评论内容不能超过500个汉字' , '消息提示'); return false; } } $.ajax({ type: "post", url: url , data: {'bid': bid , 'to' : toid ,'text': text}, dataType: 'json', success: function(data){ if(data.code == 1) { var tpl = '<div class="Blog_right1_8">'; tpl += '<div class="Blog_right_img1"><a href="' +data.info.url+ '" >' + data.info.header + '</a></div>'; tpl += '<div class="Blog_right_font1">'; tpl += '<p class="Blog_p5"><span><a href="' +data.info.url+ '" >' + data.info.username + '</a></span>' + data.info.dateline + '</p>'; tpl += '<p class="Blog_p6">' + data.info.content + '</p>'; tpl += '<div class="div1"><a href="javascript:void(0);" class="Blog_a10" toid=' + data.info.fuid + ' bid=' + data.info.bid + ' cid=' + data.info.cid + '>回复</a> |  <a class="comment_del_mark" style="cursor:pointer" url="' + data.info.delurl + '">删除</a> |  <a href="javascript:showJuBao(\'/blog/ViewReport.html\','+data.info.cid+')" class="box_report" cid="' + data.info.cid + '">举报</a></div>'; tpl += '<div class="z_move_comment" style="display:none"></div>'; tpl += '</div><div class="Blog_line1"></div></div>'; $('.Blog_tit3:first').after(tpl); $('#reply').val('文明上网,理性发言...'); } else if(data.code == -1) { showErrorMsg(data.info , '消息提示'); } }, error: function(){//请求出错处理 } }); }); //底部评论重置 $('#reset_comment').click(function(){ $('#reply').val('文明上网,理性发言...'); }); //取消回复 $('#qx_comment').live('click' , function(){ $('.z_move_comment').html('').hide(); }); $('#rmsg, #reply').live({ focus:function(){ if($(this).val() == '文明上网,理性发言...'){ $(this).val(''); } }, blur:function(){ if($(this).val() == ''){ $(this).val('文明上网,理性发言...'); } } }); //删除留言确认 $('.comment_del_mark').live('click' , function(){ var url = $(this).attr('url'); asyncbox.confirm('删除留言','确认', function(action){ if(action == 'ok') { location.href = url; } }); }); //删除时间确认 $('.del_article_id').click(function(){ var delurl = $(this).attr('delurl'); asyncbox.confirm('删除文章','确认', function(action){ if(action == 'ok') { location.href = delurl; } }); }); /* //字数限制 $('#rmsg, #reply').live('keyup', function(){ var id = $(this).attr('id'); var left = Util.calWbText($(this).val(), 500); var eid = '#errmsg'; if(id == 'reply') eid = '#rerrmsg'; if (left >= 0) $(eid).html('您还可以输入<span>' + left + '</span>字'); else $(eid).html('<font color="red">您已超出<span>' + Math.abs(left) + '</span>字 </font>'); }); */ //加载表情 $('#face').qqFace({id : 'facebox1', assign : 'reply', path : '/image/qqface/'}); $('#mface').qqFace({id : 'facebox', assign : 'rmsg', path:'/image/qqface/'}); /* $('#class_one_id').change(function(){ alert(123213); var id = parseInt($(this).val() , 10); if(id == 0) return false; $('.hidden_son_class span').each(function( index , dom ){ if( dom.attr('cid') == id ) { } }); }); */ //转载文章 var turn_url = "/blog/viewClassPart.html"; $('#repost_bar').click(function(){ if(isOnLine == '' ) { //showErrorMsg('登录之后才能进行此操作' , '消息提示'); showErrorMsg('操作失败,您需要先登录!', '消息提示', 'http://account.chinaunix.net/login'); return false; } var id = $(this).attr('bid'); asyncbox.open({ id : 'turn_class_thickbox', url : turn_url, title : '转载文章', width : 330, height : 131, scroll : 'no', data : { 'id' : id }, callback : function(action){ if(action == 'close'){ $.cover(false); } } }); }); /* //转发文章 $('#repost_bar').live('click' , function(){ if(isOnLine == '' ) { //showErrorMsg('登录之后才能进行此操作' , '消息提示'); showErrorMsg('操作失败,您需要先登录!', '消息提示', 'http://account.chinaunix.net/login'); return false; } var bid = $(this).attr('bid'); var url = $(this).attr('url'); asyncbox.confirm('转载文章','确认', function(action){ if(action == 'ok'){ $.ajax({ type:"POST", url:url, data: { 'bid' : bid }, dataType: 'json', success:function(msg){ if(msg.error == 0){ showSucceedMsg('转发成功!', '消息提示'); }else if(msg.error == 1){ //location.href = '/index.php?r=site/login'; showErrorMsg('操作失败,您需要先登录!', '消息提示', 'http://account.chinaunix.net/login'); }else{ showErrorMsg(msg.error_content, '消息提示'); } } }); } }); }); */ }); </script> <!--该部分应该放在输出代码块的后面才起作用 --> <script type="text/javascript"> SyntaxHighlighter.autoloader( 'applescript /highlight/scripts/shBrushAppleScript.js', 'actionscript3 as3 /highlight/scripts/shBrushAS3.js', 'bash shell /highlight/scripts/shBrushBash.js', 'coldfusion cf /highlight/scripts/shBrushColdFusion.js', 'cpp c /highlight/scripts/shBrushCpp.js', 'c# c-sharp csharp /highlight/scripts/shBrushCSharp.js', 'css /highlight/scripts/shBrushCss.js', 'delphi pascal /highlight/scripts/shBrushDelphi.js', 'diff patch pas /highlight/scripts/shBrushDiff.js', 'erl erlang /highlight/scripts/shBrushErlang.js', 'groovy /highlight/scripts/shBrushGroovy.js', 'java /highlight/scripts/shBrushJava.js', 'jfx javafx /highlight/scripts/shBrushJavaFX.js', 'js jscript javascript /highlight/scripts/shBrushJScript.js', 'perl pl /highlight/scripts/shBrushPerl.js', 'php /highlight/scripts/shBrushPhp.js', 'text plain /highlight/scripts/shBrushPlain.js', 'py python /highlight/scripts/shBrushPython.js', 'ruby rails ror rb /highlight/scripts/shBrushRuby.js', 'scala /highlight/scripts/shBrushScala.js', 'sql /highlight/scripts/shBrushSql.js', 'vb vbnet /highlight/scripts/shBrushVb.js', 'xml xhtml xslt html /highlight/scripts/shBrushXml.js' ); SyntaxHighlighter.all(); function code_hide(id){ var code = document.getElementById(id).style.display; if(code == 'none'){ document.getElementById(id).style.display = 'block'; }else{ document.getElementById(id).style.display = 'none'; } } </script> <!--回顶部js2011.12.30--> <script language="javascript"> lastScrollY=0; function heartBeat(){ var diffY; if (document.documentElement && document.documentElement.scrollTop) diffY = document.documentElement.scrollTop; else if (document.body) diffY = document.body.scrollTop else {/*Netscape stuff*/} percent=.1*(diffY-lastScrollY); if(percent>0)percent=Math.ceil(percent); else percent=Math.floor(percent); document.getElementById("full").style.top=parseInt(document.getElementById("full").style.top)+percent+"px"; lastScrollY=lastScrollY+percent; if(lastScrollY<200) { document.getElementById("full").style.display="none"; } else { document.getElementById("full").style.display="block"; } } var gkuan=document.body.clientWidth; var ks=(gkuan-960)/2-30; suspendcode="<div id=\"full\" style='right:-30px;POSITION:absolute;TOP:500px;z-index:100;width:26px; height:86px;cursor:pointer;'><a href=\"javascript:void(0)\" onclick=\"window.scrollTo(0,0);\"><img src=\"\/image\/top.png\" /></a></div>" document.write(suspendcode); window.setInterval("heartBeat()",1); </script> <!-- footer --> <div class="Blog_footer" style='clear:both'> <div><a href="http://www.chinaunix.net/about/index.shtml" target="_blank" rel="nofollow">关于我们</a> | <a href="http://www.it168.com/bottomfile/it168.shtml" target="_blank" rel="nofollow">关于IT168</a> | <a href="http://www.chinaunix.net/about/connect.html" target="_blank" rel="nofollow">联系方式</a> | <a href="http://www.chinaunix.net/about/service.html" target="_blank" rel="nofollow">广告合作</a> | <a href="http://www.it168.com//bottomfile/flgw/fl.htm" target="_blank" rel="nofollow">法律声明</a> | <a href="http://account.chinaunix.net/register?url=http%3a%2f%2fblog.chinaunix.net" target="_blank" rel="nofollow">免费注册</a> <p>Copyright 2001-2010 ChinaUnix.net All Rights Reserved 北京皓辰网域网络信息技术有限公司. 版权所有 </p> <div>感谢所有关心和支持过ChinaUnix的朋友们 <p><a href="http://beian.miit.gov.cn/">16024965号-6 </a></p> </div> </div> </div> </div> <script language="javascript"> //全局错误提示弹出框 function showErrorMsg(content, title, url){ var url = url || ''; var title = title || '消息提示'; var html = ''; html += '<div class="HT_layer3_1 HT_layer3_2"><ul><li><p><span class="login_span1"></span>' + content + '</p></li>'; if(url == '' || url.length == 0){ html += '<li class="HT_li1"><input type="button" class="HT_btn2" onclick=\'close_windows("error_msg")\'></li>'; } else { html += '<li class="HT_li1"><input type="button" class="login_btn1" onclick="location.href=\'' + url + '\'"></li>'; } html += '</ul></div>'; $.cover(true); asyncbox.open({ id: 'error_msg', title : title, html : html, 'callback' : function(action){ if(action == 'close'){ $.cover(false); } } }); } //全局正确提示 function showSucceedMsg(content, title , url ){ var url = url || ''; var title = title || '消息提示'; var html = ''; html += '<div class="HT_layer3_1 HT_layer3_2"><ul><li><p><span class="login_span2"></span>' + content + '</p></li>'; if(url == '' || url.length == 0){ html += '<li class="HT_li1"><input type="button" class="HT_btn2" onclick=\'close_windows("error_msg")\'></li>'; } else { html += '<li class="HT_li1"><input type="button" class="HT_btn2" onclick="location.href=\'' + url + '\'"></li>'; } html += '</ul></div>'; $.cover(true); asyncbox.open({ id: 'error_msg', title : title, html : html, 'callback' : function(action){ if(action == 'close'){ $.cover(false); } } }); } //关闭指定id的窗口 function close_windows(id){ $.cover(false); $.close(id); } //公告 var tID; var tn; // 高度 var nStopTime = 5000; // 不同行间滚动时间隔的时间,值越小,移动越快 var nSpeed = 50; // 滚动时,向上移动一像素间隔的时间,值越小,移动越快 var isMove = true; var nHeight = 25; var nS = 0; var nNewsCount = 3; /** * n 用于表示是否为第一次运行 **/ function moveT(n) { clearTimeout(tID) var noticev2 = document.getElementById("noticev2") nS = nSpeed; // 只在第一次调用时运行,初始化环境(有没有参数) if (n) { // 设置行高 noticev2.style.lineHeight = nHeight + "px"; // 初始化显示位置 tn = 0; // 刚进入时在第一行停止时间 nS = nStopTime; } // 判断鼠标是否指向层 if (isMove) { // 向上移动一像素 tn--; // 如果移动到最下面一行了,则移到顶行 if (Math.abs(tn) == nNewsCount * nHeight) { tn = 0; } // 设置位置 noticev2.style.marginTop = tn + "px"; // 完整显示一行时,停止一段时间 if (tn % nHeight == 0) { nS = nStopTime; } } tID = setTimeout("moveT()", nS); } moveT(1); // 此处可以传入任何参数 </script> <script type="text/javascript"> // var _gaq = _gaq || []; // _gaq.push(['_setAccount', 'UA-20237423-2']); // _gaq.push(['_setDomainName', '.chinaunix.net']); // _gaq.push(['_trackPageview']); // // (function() { // var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; // ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; // var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); // })(); </script> <script type="text/javascript"> var _bdhmProtocol = (("https:" == document.location.protocol) ? " https://" : " http://"); document.write(unescape("%3Cscript src='" + _bdhmProtocol + "hm.baidu.com/h.js%3F0ee5e8cdc4d43389b3d1bfd76e83216b' type='text/javascript'%3E%3C/script%3E")); function link(t){ var href= $(t).attr('href'); href+="?url="+encodeURIComponent(location.href); $(t).attr('href',href); //setCookie("returnOutUrl", location.href, 60, "/"); } </script> </body> </html>