0

当我像这样通过 Ajax JQuery 加载表单时:

$('#quick_feed').load('api/shs/loaders.php?do=ask_question');

表单出现,但问题是当我单击提交按钮时,表单不处理提交。这是这个表格

<div class="feed_header">
    <div class="feed_profilepic"><img src="profile_pics/<?php echo $session->profile_pic; ?>" width="50" height="50" class="image3" border="0"></div>
    <div class="feed_postedby"><?php echo $session->full_name; ?></div>
    <div class="feed_posted"></div>
</div>

<div class="feed_header" style="padding-top: 3px;">
<form action="?task=submit" method="POST"><input type="text" style="width:  97.7%; color: #000;" class="box" name="question" value="">
</div>

<div class="feed_header" style="padding-top: 2px;">
<textarea rows="10" name="question_more" id="aboutyou" cols="30" style="resize:none; width: 99%"></textarea>
</div>

<div class="feed_header" style="padding-top: 2px;">
</div>

    <div class="feed_header" style="padding-top: 2px;">
    <div class="feed_buttons" id="ask" style="padding-left: 5px;"><p><input type="submit" value="Ask It"></form></p></div>
<a href="#" onClick="AADS(); return false"><div class="feed_buttons" style="padding-left: 5px; padding-top: 0px;"><p><span class="feed_button" style="background-color:#999; margin-top: 3px;">Cancel</span></p></div></a>
</div>

表单的提交是加载表单的页面。有什么建议么?

4

1 回答 1

0

从包裹<form>标签的 div 中删除表单,并在同一级别结束标签:

<form action="?task=submit" method="POST"><input type="text" style="width:  97.7%; color: #000;" class="box" name="question" value="">
   <div class="feed_header" style="padding-top: 2px;">
      <textarea rows="10" name="question_more" id="aboutyou" cols="30" style="resize:none; width: 99%"></textarea>
   </div>

   <div class="feed_header" style="padding-top: 2px;">
   </div>

    <div class="feed_header" style="padding-top: 2px;">
       <div class="feed_buttons" id="ask" style="padding-left: 5px;">
          <p><input type="submit" value="Ask It"></p>
       </div>
       <a href="#" onClick="AADS(); return false">
          <span class="feed_buttons" style="padding-left: 5px; padding-top: 0px;">
              <span class="feed_button" style="background-color:#999; margin-top: 3px;">Cancel</span>
          </span> 
       </a>
    </div>
</form>
于 2013-06-20T17:58:39.720 回答