iOS HTML Webapp登录过程

时间:2015-03-13 14:36:24

标签: html ios web-applications

我在努力解决这个问题。我在iOS制作学校主页登录表格,真的很难。我在这里得到了HTML。

<!DOCTYPE HTML >
<html  lang="en-US"> 
<body class='login-page'>
<form onsubmit="return validate_form( this, false, false );" method="POST"        
action="http://blackboard.unk.edu/webapps/login/" NAME="login" >


<div id="loginFormFields" class="clearfix">
<ul id="loginFormList" class="clearfix">
<li class="clearfix">
  <label for="user_id">Username:</label>
  <input type="text" name="user_id" id="user_id" size="25" maxlength="50"/>
 </li>
<li class="clearfix">
  <label for="password">Password:</label> 
  <input size="25" name="password" id="password" type="password" autocomplete="off"/>
 </li>
 <li class="clearfix">
  <input type="submit" value="Login" name="login" class="submit button-1"/>
 </li>
 </ul>
 </div>  <input type="hidden" name="action" value="login" />
 <input type="hidden" name="remote-user" value="" />
 <input type="hidden" name="new_loc" value="" />
 <input type="hidden" name="auth_type" value="" />
 <input type="hidden" name="one_time_token" value="" />
 <input type="hidden" name="encoded_pw" value="" />
 <input type="hidden" name="encoded_pw_unicode" value="" />
 </form></div>  
  </div>
   </body>
 </html>

我如何在iOS中发送此表单? HTMl代码下面是我想在登录后获得的代码

 <html  lang="en-US"> 
 <body>
 <h2 class="  clearfix">
 <span class="moduleTitle" >My Courses</span>
 </h2>
 <div class="collapsible" style="overflow: auto;">
 <div id="div_4_1">Please wait while the module loads...</div>
 <script type="text/javascript">
 Event.observe(window, 'load',
 function() { 
 new Ajax.Request('/webapps/portal/execute/tabs/tabAction', {method: 'post', parameters: 
 'action=refreshAjaxModule&modId=_4_1&tabId=_15_1&tab_tab_group_id=_14_1', 
onSuccess: function(transport) 
{
try 
{ 
var res = transport.responseXML.getElementsByTagName('contents')[0].firstChild.nodeValue;$('div_4_1').innerHTML = res.stripScripts();page.globalEvalScripts( res,true );
 } 
catch ( e ) { 
$('div_4_1').innerHTML = 'Module information is temporarily unavailable.
  Please reload the page. <!--' + e.toString().escapeHTML().gsub( '-', '&#045;' ) + '-->';.
 }
 }, 
 onFailure: function(transport)
 {$('div_4_1').innerHTML = 'Error loading module.';}}); });
 </script>
 </div>
 </div>

我看到很多例子,如AFnetworking,Hpple和其他各种各样的东西。他们没有告诉我有关webapp登录过程的信息。请帮助我掌握。

0 个答案:

没有答案