-1
我想用PHP做一個AJAX代碼。jQuery AJAX格式 - HTML PHP格式自動更改後加載
主要PHP代碼是here。
並且支持PHP代碼(每次加載AJAX)是here。
AJAX加載完美。
但它沒有完全加載。
什麼AJAX是應該做的每一次是給這種類型的代碼 -
<tr>
<form action="update" method="post">
<th nowrap=""><?php echo '<a href="profile/'.$row_list['vanity_url'].'" target="_new">'.substr($row_list['name'],0,15).'</a>'; ?></th>
<th ><input type="text" readonly value='<?php echo $row_list['vanity_url']; ?>' class="login-text name right10 form-control" style="width: 600px" id="registerCompany" name="old"></th>
<th nowrap=""><br/></th>
<th ><input type="text" class="login-text name right10 form-control" style="width: 600px" id="registerCompany" name="new" placeholder="*New URL" required autocomplete="off" ></th>
<th nowrap=""><br/></th>
<th nowrap=""><button type="submit" class="btn btn-primary">Update</button></th>
</form>
</tr>
但它不給這個。它是給
<tr>
<form action="update" method="post"></form>
<th nowrap=""><?php echo '<a href="profile/'.$row_list['vanity_url'].'" target="_new">'.substr($row_list['name'],0,15).'</a>'; ?></th>
<th ><input type="text" readonly value='<?php echo $row_list['vanity_url']; ?>' class="login-text name right10 form-control" style="width: 600px" id="registerCompany" name="old"></th>
<th nowrap=""><br/></th>
<th ><input type="text" class="login-text name right10 form-control" style="width: 600px" id="registerCompany" name="new" placeholder="*New URL" required autocomplete="off" ></th>
<th nowrap=""><br/></th>
<th nowrap=""><button type="submit" class="btn btn-primary">Update</button></th>
</tr>
所以,窗體關閉,所以它不能使用。
任何人都可以幫助我嗎?
在此先感謝您的幫助。
您返回的HTML無效。 檢查此答案http://stackoverflow.com/questions/1249688/html-is-it-possible-to-have-a-form-tag-in-each-table-row-in-a-xhtml-valid -辦法 – 2014-12-03 19:37:54