基本上,我知道如何使用NSURLConnection
. 但问题是web表单中有3个提交按钮,当你点击其中任何一个时,服务器会检查被点击的那个。在 iOS 或可可中,我将如何告诉服务器这件事?
这是html中表单的代码:
<form name="myform" action="checkLogin.jsp" method="post" onSubmit="return checkSubmit();">
<table cellspacing="0" cellpadding="0" width="100%" border="0">
<tr>
<td height="38" width="80" class="login_txt">account:&nbsp; </td>
<td width="200"><input type="text" class="editbox4" name="username" id="username" value="" size="20" maxlength="24"></td>
<td width="240"> </td>
</tr>
<tr>
<td height="35" class="login_txt">password: </td>
<td><input type="password" class="editbox4" name="password" id="password" size="20" maxlength="24" style="height: 25px;vertical-align: middle;"> <img src="public/images/luck.gif" width="19" height="18" style="vertical-align: bottom;"></td>
<td> </td>
</tr>
<tr>
<td height="35" class="login_txt">ip:&nbsp; </td>
<td><span class="login_txt">118.228.173.165</span><input type="hidden" name="ip" value="118.228.173.165"> </td>
<td> </td>
</tr>
<tr>
<td height="35" colspan="3"><input type="submit" value="connect" class="login_button" name="action"> <input type="submit" value="disconnect" class="login_button" name="action"> <input type="submit" value="manage" class="login_button" name="action"></td>
</tr>
</table>
</form>