私はアンドロイドでのフォンギャップ開発が初めてです。私は phonegap アプリケーションに取り組んでいます。form タグを使用してサーバーにコードを送信しました。今、私は結果を取り戻したいと思っています。サーバーから返された結果を取得する方法を教えてください。結果は JSON 形式です。
これは、HTMLファイルでフォームを送信するために使用しているコードです。
<form id="signUpform" action="http://web1.xxx.com/sss/signup.php" method="post"
onsubmit="return( validate() );">
<div style="float:left; width: 100%; height: inherit;">
<h3>New Client</h3>
</div>
<br />
<div style="float:left; width: 80%; height: inherit; margin-top: 5px;">
<div style="float:left; width: 40%; height: inherit; margin-top: 5px; padding-top: 8px;">
<label>UserName </label></div>
<div style="float:right; width: 60%; height: inherit;">
<input id="UserUsername" type="text" name="username" /></div>
</div>
<br />
<div style="float:left; width: 80%; height: inherit; margin-top: 5px;">
<div style="float:left; width: 40%; height: inherit; margin-top: 5px; padding-top: 8px;">
<label>Password </label></div>
<div style="float:right; width: 60%; height: inherit;">
<input id="pass" type="text" name="password" /></div>
</div>
<br />
<div style="float:left; width: 80%; height: inherit; margin-top: 5px;;">
<div style="float:left; width: 40%; height: inherit; margin-top: 5px; padding-top: 8px;">
<label> Confirm Password </label></div>
<div style="float:right; width: 60%; height: inherit;">
<input id="cpass" type="text" name="confirm_password" /></div>
</div>
<br />
<div style="vertical-align:middle; float:left; width: 80%; height: inherit; margin-top: 5px;">
<div style="float:left; width: 40%; height: inherit; margin-top: 5px; padding-top: 8px;">
<label> Email ID </label></div>
<div style="float:right; width: 60%; height: inherit;">
<input id="UserEmail" type="text" name="email" /></div>
</div>
<br />
<div style="float:left; width: 80%; height: inherit; margin-top: 5px;">
<div style="float:right; width: 100%; height: inherit;">
<input type="submit" value="Get Started"/> </div>
</div>
</form>
フォームがサーバーに送信されます。結果を JSON 形式で返します。結果は次のとおりです。
{"UserID":"220"}
これは、フォームを送信した後にデバイスに印刷されます。
この値を取得する方法を教えてください。
前もって感謝します