首页 > 作文

HTML5打开本地app应用的方法

更新时间:2023-04-06 20:44:49 阅读: 评论:0

本文为大家分享了html5打开本地app应用的方法,具体内容如下

首先为了保证高一成绩能够打开你的宜兴中学app,你必须要在androidmanifest.xml中配置的filter中data的属性表述。<data android:pathprefix=”/taoge/open” android:scheme=”xttblog”></data> androidmanifest.xml代码如下:

xml/html code
复制内容到剪贴板

<?xmlversion=“1.0”encoding=“utf-8”?> <manifestxmlns:android=“http://schemas.android.com/apk/res/android” package=“com.taoge” android:versioncode=“2” android:versionname=“3.24.03”> <us-sdk android:minsdkversion=“8” android:targetsdkversion=“17”/> <application android:allowbackup=“true” android:configchanges=“orientation|screensize” android:icon=“@drawable/logo” android:label=“@string/app_name” 团购营销方案android:logo=“@drawable/logo” android:sharedurid=“android.uid.system” android:theme=“@android:style/theme.light.notitlebar”> <activity android:name=“xttblog.welcomeactivity” android:excludefromrecents=“true” android:screenorientation=“portrait” android:theme=“@android:style/theme.light.notitlebar”> <intent-filter> <actionandroid:name=“android.intent.action.main”/> <categoryandroid:name=“android.intent.category.launcher”/> </intent-filter> <intent-filter> <actionandroid:name=“android.intent.action.view”/> <categoryandroid:name=“android.intent.category.browsable”/> <categoryandroid:name=“android.intent.category.default”/> <dataandroid:pathprefix=“/taoge/open” android:scheme=“xttblog”/> </intent-filter> </activity> <activity android:name=“xttblog.antrepairactivity” android:label=“@string/title_activity_ant_repair”> </activity> </applicat陕西十大名校ion> </manifest>

其次,你要在你的网页中访问xttblog://taoge/open。可以使用的元素有很多,如:script,iframe,img等。使用它们的src属性,访问xttblog://taoge/open。html5代码如下:

xml/html code
复制内容到剪贴板

<!doctypehtml> <html> <script> functionopenapp(){ document.getelementbyid(‘xttblog’).innerhtml=‘<iframesrc=”xttblog://taoge/open”></iframe>’; } </script> <body> <divstyle=“中文文秘类包括哪些专业display:none;”id=“xttblog”></div> <inputtype=“button”value=“打开app”onclick=“openapp();”> </body> </html>

以上就是本文的全部内容,希望对大家的学习有所帮助。

本文发布于:2023-04-06 20:44:46,感谢您对本站的认可!

本文链接:https://www.wtabcd.cn/fanwen/zuowen/ba42b0ebef69704a39247f9fc85906a2.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

本文word下载地址:HTML5打开本地app应用的方法.doc

本文 PDF 下载地址:HTML5打开本地app应用的方法.pdf

标签:剪贴板   要在   宜兴   属性
相关文章
留言与评论(共有 0 条评论)
   
验证码:
Copyright ©2019-2022 Comsenz Inc.Powered by © 专利检索| 网站地图