无法使用“GExistsChanges1.html”中Javascript代码中的文件“GExists.sql”来“插入、删除和更新”表“chkdmp”
我收到以下错误:无法使用“GExistsChanges1.html”中Javascript代码中的文件“GExists.sql”来“插入、删除和更新”表“chkdmp”,javascript,html,sqlite,cordova,visual-studio-cordova,Javascript,Html,Sqlite,Cordova,Visual Studio Cordova,我收到以下错误: XMLHttpRequest cannot load file:///E:/A%20Semi%20-%20Static/Testing/Testing%20Database%20connection%20with%20SQLite3/GExists.sql. Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https, chr
XMLHttpRequest cannot load file:///E:/A%20Semi%20-%20Static/Testing/Testing%20Database%20connection%20with%20SQLite3/GExists.sql. Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https, chrome-extension-resource.
Uncaught NetworkError: Failed to execute 'send' on 'XMLHttpRequest': Failed to load 'file:///E:/A%20Semi%20-%20Static/Testing/Testing%20Database%20connection%20with%20SQLite3/GExists.sql'.
in running the following html “GExistsChanges1.html”
当我在Google chrome中运行以下“GExistsChanges1.html”时
->
->
克雷佐
var-db;
//当事务中发生错误时调用此函数
函数errorHandlertransaction,错误{
警报'Error:'+Error.message+'代码:'+Error.code;
}
//当成功的事务发生时调用此函数
函数成功回调{
调试成功;
}
函数nullHandler{};
//在应用程序加载时调用
负重功能{
alertDEBUGGING:我们在onBodyLoad函数中;
$.get'GExists.sql',函数响应{
var db=openDatabase'GExists','1.0','myDatabase',10000000;
};
//使用jquery在屏幕上列出数据库中的值以更新lbUsers元素
函数ListDBValues{
if!window.openDatabase{
警报“此浏览器不支持数据库。”;
回来
}
//这一行清除页面上lbUsers元素中的任何内容,以便接下来的几行显示更新的内容
//内容,而不仅仅是重复台词
$'lbUsers'.html;
//下一节将从用户表中选择所有内容,然后逐行浏览
//将UserId FirstName LastName追加到页面上的lbUsers元素
db.transactionfunction事务{
executeSql'SELECT*FROM chkdmp;',[],函数事务,结果{
如果result!=null&&result.rows!=null{
对于变量i=0;i