Groups
Groups
Sign in
Groups
Groups
PhoneGap中国
Conversations
About
Send feedback
Help
loadUrl 可以用sdcard上的html吗?
1 view
Skip to first unread message
雷炎
unread,
Oct 30, 2012, 2:19:09 AM
10/30/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Phone...@googlegroups.com
哪位大侠指点一下loadUrl怎么加载sdcard上的html 万分感谢
徐辉
unread,
Oct 31, 2012, 10:00:12 PM
10/31/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Phone...@googlegroups.com
file:///android_asset/www/index.html 这样是加载phonegap里面的www文件夹
我没具体尝试,但我以为file:///www,这样的操作是访问SDCARD上的WWW目录。
在 2012年10月30日 下午2:19,雷炎
<
xiaoch...@gmail.com
>
写道:
哪位大侠指点一下loadUrl怎么加载sdcard上的html 万分感谢
廖金舟
unread,
Nov 1, 2012, 6:16:20 AM
11/1/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Phone...@googlegroups.com
你这个方式不行,其实file:///这种方式加载html限制太多,尤其是ajax的跨越处理,我的解决办法是自己写一个http server运行在手机上,第一次运行app时将HTML文件部署到这个http server里,然后用
http://localhost:8080/index.html
的方式来访问,效果很好。
xin cui
unread,
Nov 1, 2012, 6:51:35 AM
11/1/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Phone...@googlegroups.com
httpserver 在手机上运行,首先耗资源,其次也用不到这么重量级的东西吧,参考一下原生怎么访问sdcard的
雷炎
unread,
Nov 6, 2012, 8:01:28 PM
11/6/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Phone...@googlegroups.com
原来直接file:///mnt/sdcard/就可以,呵呵
在 2012年10月30日星期二UTC+8下午2时19分09秒,雷炎写道:
哪位大侠指点一下loadUrl怎么加载sdcard上的html 万分感谢
Reply all
Reply to author
Forward
0 new messages