0
ブラウザで以下のコードを通常のhtml5コードとして実行すると、正常に動作します。私はアンドロイドを使用して同じ結果が欲しいです。私は、次のエラーを取得しています:HTML5/javascriptエラー
12-08 12:56:26.546: ERROR/Web Console(703): TypeError: Result of expression 'service.useService' [undefined] is not a function. at file:///android_asset/www/index.html:12
<!DOCTYPE HTML>
<html>
<head>
<title>Hello World</title>
<script language="JavaScript">
var iCallID;
function InitializeService()
{
service.useService("http://10.15.1.205/HelloService/Service.asmx?wsdl", "HelloWorldService");
service.HelloWorldService.callService("HelloWorld");
}
function ShowResult()
{
document.write(event.result.value);
}
</script>
</head>
<body onload="InitializeService()" id="service" style="behavior:url(webservice.htc)" onresult="ShowResult()">
</body>
</html>
を見つける必要が実行されますか?あなたのjavascriptが要素 'service'が何であるか分からないようです。 – Tobbe
ご返信ありがとうございます。 HTMLのbodyタグの中にjavascriptコードを挿入しましたが、うまくいきませんでした。 – user1082868
アンドロイドのどのバージョンですか?どのブラウザですか?とブラウザのバージョン? – ManseUK