Php 通过ajax替换表单中的输入值
我的表格是这样的。我已将field_name和field_值保存到MySQL表中 我数据库中的表如下所示 ID |字段|名称|字段|值 12 |字段1 |示例文本 13 |字段2 |剽窃 如何将这些值加载到下表中 我的意思是,如何在页面加载时使用jqueryajax更改field1的值以根据表和其余字段对文本进行采样 此表单是通过表单生成器动态生成的Php 通过ajax替换表单中的输入值,php,jquery,mysql,Php,Jquery,Mysql,我的表格是这样的。我已将field_name和field_值保存到MySQL表中 我数据库中的表如下所示 ID |字段|名称|字段|值 12 |字段1 |示例文本 13 |字段2 |剽窃 如何将这些值加载到下表中 我的意思是,如何在页面加载时使用jqueryajax更改field1的值以根据表和其余字段对文本进行采样 此表单是通过表单生成器动态生成的 <form id="form-preview" class="TTWForm" method=&q
<form id="form-preview" class="TTWForm" method="post" novalidate="">
<div id="field1-container" class="field f_100">
<label for="field1">
Comments
</label>
<textarea rows="5" cols="20" name="field1" id="field1" required="required"></textarea>
</div>
<div id="field2-container" class="field f_100 radio-group required">
<label for="field2-1">
Level of work
</label>
<div class="option clearfix">
<input name="field2" id="field2-1" value="Need Revisions" type="radio">
<span class="option-title">
Need Revisions
</span>
</div>
<div class="option clearfix">
<input name="field2" id="field2-2" value="Plagiarised" type="radio">
<span class="option-title">
Plagiarised
</span>
</div>
<div class="option clearfix">
<input name="field2" id="field2-3" value="Archive it" type="radio">
<span class="option-title">
Archive it
</span>
</div>
</div>
<div id="form-submit" class="field f_100 clearfix submit">
<input value="Submit" type="submit">
</div>
</form>
您可以使用json编码使用从ajax返回的数据 请看这里: