ローカルファイルの取り扱い


ローカルファイルの閲覧方法

HTMLビューのscriptタグからlocation.hrefでファイルを指定することでcssやjsファイルなどを閲覧出来ます。
jQueryMobileデモ をインポート
#HTML
<script type="text/javascript" language="Javascript">location.href="jqm/demos/index.html"</script>
 



XMLHttpRequestを使うとcssやjsファイルの他、JsonSotrageファイルやShortcutsファイルの中身も見ることができます。
JsonStorage確認 をインポート
TARGET = "info";
var url = "JsonStorage";
 
var xhr = new XMLHttpRequest();
xhr.open("GET", url, false);
xhr.send(null);
var res =xhr.responseText;
 
res;
 


ローカルファイルの位置

Dcuments
├Inbox
├Outbox
├bootstrap
│├css
││├bootstrap-responsive.css
││├bootstrap-responsive.min.css
││├bootstrap.css
││└bootstrap.min.css
│├img
││└...
│└js
│ ├bootstrap.js
│ └bootstrap.min.js
├jqm
│├demos
││├css
│││└...
││├docs
│││└...
││├js
│││└...
││└index.html
│├images
││└...
│├jquery.mobile.css
│├jquery.mobile.js
│├jquery.mobile.min.css
│├jquery.mobile.min.js
│├jquery.mobile.structure.css
│├jquery.mobile.structure.min.css
│├jquery.mobile.theme.css
│└jquery.mobile.theme.min.css
├JsonStorage(JSONデータが保存される)
├Shortcuts(スクリプトが保存される)
└jquery.js

タグ:

+ タグ編集
  • タグ:
最終更新:2013年02月27日 21:03