问题
I want to only change page with jquery mobile/cordova on android phone. My simple codes:
<div data-role="header" data-position="fixed">
<h1>Event List</h1>
<a href="options.html" data-icon="gear" class="ui-btn-right">Options</a>
</div>
If I click options button,"Error loading page" looks for few seconds.Logcat:
XMLHttpRequest cannot load file:///C:/Users/btstajer/Desktop/workspace/Fetcher/assets/www/options.html. Received an invalid response. Origin 'null' is therefore not allowed access.
Hey I found problem.Due to the jquery version differences. Such as: If jquery-2.1.1.min.js the above does not work.
<script type="text/javascript" charset="utf-8" src="js/jquery-2.1.1.min.js"></script>
<script src="js/jquery.mobile-1.4.3.js"></script>
<script type="text/javascript" charset="utf-8" src="js/jquery.mobile-1.4.3.min.js"></script>
does not work. But If jquery-2.1.1.min.js bottom,work but such is not seen its css file.
<script src="js/jquery.mobile-1.4.3.js"></script>
<script type="text/javascript" charset="utf-8" src="js/jquery.mobile-1.4.3.min.js"></script>
<script type="text/javascript" charset="utf-8" src="js/jquery-2.1.1.min.js"></script>
What's the matter?? If I use jquery-1.8.3.min.js work fine but I need this version.help me And I tried on Chrome and Firefox.Chrome gave the same error.But firefox worked succesfully.Any ideas? thanks..
来源:https://stackoverflow.com/questions/24758847/origin-null-is-not-allowed-from-control-allowed-origin-when-use-jquery-header-li