在 phonegap 应用程序中,您无法通过向本地页面传递参数来调用本地页面,因为系统会搜索与您传递的名称完全相同的文件。它不会将参数视为查询字符串。
Ex: when you say "index.html?param=abc", instead of calling page index.html with a
parameter called param having value abc. It calls the page "index.html?param=abc"
which doesn't exist in the system. Hence, the error.
解决此问题的最佳方法是将参数保存为调用页面中的本地存储,在下一页中使用它们并销毁它们。
Ex: In your calling JavaScript file, use:
window.localStorage.setItem('param', 'abc');
Now, in your called file, access the local storage and delete it
param abc = window.localStorage.getItem('param');
window.localStorage.removeItem('param');
希望有帮助。