问题
i have an index.html page which calls a android activity method via JS and then that method downloads a html page from server and plces it in input folder on SD Card, after downloading that page app loads it to webView, now the problem is that jQueryMobile.js and jQueryMobile.css file are in applications's assets folder and register.html is in SDcard/input folder, how can i give reference of js and css files in register.html which is downloaded from server.
assets SDCard
- -
-index.html -
---js -input
- -
- - register.html
- jQueryMobile.js
- jQueryMobile.css
i need to put refence of css and js filed here in head of register.html
<link rel="stylesheet" href="??\jquery.mobile-1.4.2.min.css">
<script src="??\jquery.js"></script>
<script src="??\jquery.mobile-1.4.2.min.js"></script>
Problem Solved by Using
<link rel="stylesheet" href="file:///android_asset/js/jquery.mobile-1.4.2.css">
<script src="file:///android_asset/js/jquery.js"></script>
<script src="file:///android_asset/js/jquery.mobile-1.4.2.js"></script>
来源:https://stackoverflow.com/questions/22524714/accessing-application-asset-files-in-html-file