【发布时间】:2014-12-03 19:30:47
【问题描述】:
我正在尝试使用 PHP 制作 AJAX 代码。
主要的 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 无效。检查这个答案stackoverflow.com/questions/1249688/…
标签: javascript php jquery mysql ajax