0
PhoneGap에 미리 채워진 DB를 사용하려고하므로 플러그인을 사용하여 THIS 도움말의 플러그인을 사용하고 있습니다.Cordova-SQLitePlugin을 사용하려고 할 때 SyntaxError
JS :
function onLoad() {
document.addEventListener("deviceready", onDeviceReady, false);
}
// Cordova is loaded and it is now safe to make calls Cordova methods
//
function onDeviceReady() {
var db = window.sqlitePlugin.openDatabase(“test.db”, “1.0”, “testsstst”, 20000);
}
HTML :
<html>
<script type="text/javascript" src="js/index.js"></script>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Hello World</title>
</head>
<body onload="onLoad()">
<div class="app">
<h1>AAAA</h1>
</div>
<script type="text/javascript" src="cordova-2.2.0.js"></script>
</body>
</html>
내가 얻을 이러한 오류 :
11-10 11:19:27.961: D/CordovaLog(9264): Uncaught SyntaxError: Unexpected token ILLEGAL
11-10 11:19:27.965: D/CordovaLog(9264): file:///android_asset/www/js/index.js: Line 8 : Uncaught SyntaxError: Unexpected token ILLEGAL
11-10 11:19:27.965: E/Web Console(9264): Uncaught SyntaxError: Unexpected token ILLEGAL at file:///android_asset/www/js/index.js:8
11-10 11:19:28.976: D/CordovaLog(9264): Uncaught ReferenceError: onLoad is not defined
11-10 11:19:28.976: D/CordovaLog(9264): file:///android_asset/www/index.html: Line 27 : Uncaught ReferenceError: onLoad is not defined
11-10 11:19:28.976: E/Web Console(9264): Uncaught ReferenceError: onLoad is not defined at file:///android_asset/www/index.html:27
11-10 11:19:28.996: D/Cordova(9264): onPageFinished(file:///android_asset/www/index.html)
어떤 도움이 필요합니까?