0
경고 상자, 스플래시 화면처럼 phonegap에서 함수를 실행하는 데 문제가 있습니다. 그래서 어떤 해결책이 있다면 알려주세요. 하나의 코드 (index.html)는 경고창 적용을 위해 아래에 주어집니다.Phone Gap에 클래스를로드 할 수 없습니다.
<!DOCTYPE html>
<html>
<head>
<title>Notification Example</title>
<script type="text/javascript" charset="utf-8" src="cordova-2.2.0.js"></script>
<script type="text/javascript" charset="utf-8">
// Wait for Cordova to load
//
document.addEventListener("deviceready", onDeviceReady, false);
// Cordova is ready
//
function onDeviceReady() {
// Empty
}
// alert dialog dismissed
function alertDismissed() {
// do something
}
// Show a custom alertDismissed
//
function showAlert() {
navigator.notification.alert(
'You are the winner!', // message
alertDismissed, // callback
'Game Over', // title
'Done' // buttonName
);
}
</script>
</head>
<body>
<p><a href="#" onclick="showAlert(); return false;">Show Alert</a></p>
</body>
</html>
나는 값진 솔루션을 기대합니다.
감사합니다.
당신은 스택 트레이스가 있습니까? – asgoth
당신의 문제는 정확히 무엇입니까? – Gajotres
Gajotres : Phonegap (index.html)의 코드를 시뮬레이트하고 싶습니다. 그러나 그것은 클래스를로드 할 수 없다는 것을 보여줍니다. 그래서 내가 뭘 할 수 있는지 말해줘? – user1934206