我在j中使用jquery append获取更多字段。但是不知道如何在Db中插入多值。请帮我。
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
$tr="<tr><td><input type='input' name='title' /></td><td><textarea name='text'></textarea></td></tr>";
$("#btn2").click(function(){
$("#tb").append($tr);
});
});
</script>
<?php echo validation_errors(); ?>
<button id="btn2">add New</button>
<?php echo form_open('welcome/create'); ?>
<table id="tb" width="100%">
<tr>
<td>Title
</td>
<td>Text
</td>
</tr>
</table>
<input type="submit" name="submit" value="Create news item" />
</form>
叮当猫咪
浮云间