【发布时间】:2014-03-19 14:10:09
【问题描述】:
在Mistar website 上,我正在尝试使用 NSURLSession 从 iOS 应用程序发出请求,该应用程序在后台加载上面的网站,将用户名和密码的两个字符串传递给 <input>,然后让我访问登录页面。
这是相关的 HTML,它是一个有两个输入表单的表格,pin 是用户名,然后是密码:
<div class="widgetbdy" style="border-bottom-left-radius: 10px; border-bottom-right-radius: 10px;">
<table border="0" cellpadding="2" cellspacing="0" class="txtin3" style="width:100%; border-collapse: collapse">
<tbody><tr style="height:10px;">
<td colspan="2" style="height:10px;"></td>
</tr>
<tr style="padding-top:4px;">
<td align="right" style="width:30%;">
<b><label for="ID" id="lblID">ID</label>:</b>
</td>
<td align="left">
<input class="txtin" id="Pin" name="Pin" onfocus="clearmessages()" style="width:175px;" type="text" value="">
</td>
</tr>
<tr>
<td align="right" style="width:30%;">
<b><label for="Password" id="lblPassword">Password</label>:</b>
</td>
<td align="left">
<input class="txtin" id="Password" name="Password" onfocus="clearmessages()" style="width:175px;" type="password" value="">
</td>
</tr>
<tr>
<td id="loginerrormsg" align="center" colspan="2">
<img id="imgwait" src="./Student Portal_files/ajax-loader.gif" width="20" height="20" alt="" style="display:none;">
<div id="msg1" style="display: none;" class="error"><label for="idandpasswordrequired" id="lblidandpasswordrequired">ID and Password Required</label></div>
<div id="msgdisplay" style="display: none;">
<div id="msgmessage" style="text-align:center; padding-bottom:10px;" class="error"></div>
</div>
</td>
</tr>
<tr>
<td align="right" colspan="2">
<input id="LoginButton" style="visibility: visible" type="button" value="Log In">
</td>
</tr>
<tr style="height:10px;">
<td colspan="2" style="height:10px;"></td>
</tr>
</tbody></table>
</div>
【问题讨论】:
标签: html ios http nsurl nsurlsession