我有一个动作按钮。当我点击它时,它应该在div中打开一组字段。再次,我点击此操作按钮,它应显示div与前一个相同的内容和字段。每次用户点击一个新的div应该创建相同的字段,并在点击保存按钮时必须捕获这些数据。
答案 0 :(得分:2)
我理解你的上下文但不完全是这里我正在回答你的一些猜测工作
<button type="button" id="createFields" name="createFields">Click Me!</button>
在script / jquery
<script type="text/javascript">
$(function () { $(document).ready(function () {
$("#createFields").click(function () {
("div").append(function(){ "return "<b>html fields inside </b>";//append something here....doing this might complete your task
});
});
});