我一直在寻找几个小时,但无法找出我的代码有什么问题。我点击提交按钮,它不会提交。如果我在第一个开始表格标签的末尾放置一个结束div,那么它将提交,但一切都不合适。请帮忙!
<form action="../home" method="post">
<table class="position-details" cellpadding="0" cellspacing="0" border="0">
<tbody><tr>
<td class="label"><label for="jobTitle" style="padding-top:10px;">Job title</label></td>
<td>
<input id="jobTitle" name="jobTitle" required="required" size="60" type="text"/><br>
Example: “Rails Programmer”
</td>
</tr>
<tr>
<td style="padding-top: 4px;"><label>Category</label></td>
<td style="padding-bottom: 0;">
<ul class="category selectable_container" style="list-style: none;">
<li class="selectable selected">
<input checked="checked" id="Programming" name="listing[category_id]" onclick="$(this).fire("selectable:changed");" type="radio" value="Programming">
<label for="Programming">Programming</label>
</li>
<li class="selectable">
<input id="Design" name="listing[category_id]" onclick="$(this).fire("selectable:changed");" type="radio" value="Design">
<label for="Design">Design</label>
</li>
<li class="selectable">
<input id="Business" name="listing[category_id]" onclick="$(this).fire("selectable:changed");" type="radio" value="Business">
<label for="Business">Business</label>
</li>
<li class="selectable">
<input id="SystemAdmin" name="listing[category_id]" onclick="$(this).fire("selectable:changed");" type="radio" value="SystemAdmin">
<label for="SystemAdmin">System Admin</label>
</li>
<li class="selectable">
<input id="Copywriter" name="listing[category_id]" onclick="$(this).fire("selectable:changed");" type="radio" value="Copywriter">
<label for="Copywriter">Copywriter</label>
</li>
<li class="selectable">
<input id="Customer" name="listing[category_id]" onclick="$(this).fire("selectable:changed");" type="radio" value="Customer">
<label for="Customer">Customer Service/Support</label>
</li>
<li class="selectable">
<input id="Miscellaneous" name="listing[category_id]" onclick="$(this).fire("selectable:changed");" type="radio" value="Miscellaneous">
<label for="Miscellaneous">Miscellaneous</label>
</li>
</ul>
</td>
</tr>
<tr>
<td class="label"><label for="jobHeadquarters" style="padding-top:10px;">Headquarters</label></td>
<td>
<input id="jobHeadquarters" name="jobHeadquarters" required="required" size="60" type="text"><br>
“Chicago, IL”, “Stockholm, Sweden”
</td>
</tr>
<tr>
<td class="label"><label for="jobApply" style="padding-top:10px;">How To Apply</label></td>
<td>
<input id="jobApply" name="jobApply" required="required" size="60" type="text"/><br>
“resumes@company.com” or "http://company.com"
</td>
</tr>
</tbody></table>
<div class="position-description">
<p><label for="jobDescription">Job description</label></p>
<div class="rich_text_area uses_div">
<div class="text_area">
<div id="listing_description_editor" class="editor" contenteditable="true" style="height:250px;"></div>
<input class="body" id="jobDescription" name="jobDescription" required="required" type="hidden"/>
</div>
</div>
</div>
<h2 style="font-family:FuturaBT-Book;">Company Details</h2>
<table class="company-details">
<tbody>
<tr>
<td class="label"><label for="companyName">Name</label></td>
<td>
<input id="companyName" name="companyName" required="required" size="60" type="text"/><br>Enter your company or organization’s name.
</td>
</tr>
<tr>
<td class="label"><label for="companyUrl">URL</label></td>
<td>
<input id="companyUrl" name="companyUrl" size="60" type="text"/><br>
Example: http://www.google.com
</td>
</tr>
<tr>
<td class="label"><label for="companyEmail">Email</label></td>
<td>
<input id="companyEmail" name="companyEmail" required="email" size="60" type="text"/><br>
This is where we’ll send your receipt and confirmation email.
</td>
</tr>
</tbody></table>
<h2>Help your ad stand out</h2>
<div class="highlight-listing">
<p>For only <strong>$50 more</strong> you can highlight your ad. Highlighted ads have a yellow background in the list so they stand out against the others.</p>
<p>
<input name="listing[highlight]" type="hidden" value="0"><input id="listing_highlight" name="listing[highlight]" type="checkbox" value="1">
<label for="listing_highlight"><strong>Yes, highlight my ad</strong> for only $50.</label>
</p>
</div>
<button value="Send" class="btn btn-success" type="submit" id="submit"/></form>
我正在部分渲染上面的代码。它进入了这个:
<div class="header-new-post">
<div class="header-new-post-container">
<div class="topstatus">
<ul>
<li class="new">1. Create your ad</li>
<li class="preview">2. Preview</li>
<li class="purchase" style="margin-right: 0;">3. Purchase and publish</li>
</ul>
</div>
</div>
</div>
<div class="container">
<div class="create-header">
<div class="create-info">
<p>Your job listing will remain on this site for 30 days. After 30 days your job listing will expire and be removed. You can always post the job again for $100 for another 30 days.</p>
</div>
<h1>Step 1: Create your Ad</h1>
</div>
<div class="theFormItself" style="padding-left: 70px;">
<%= render 'home/submitpartial' %>
</div>
</div>
答案 0 :(得分:0)
尝试
<input type="submit">
答案 1 :(得分:0)
<button class="btn btn-success" type="submit" id="submit" >Send</button>