Open xiangwan opened 10 years ago
the form look like this
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<form id="form_add" class="form-horizontal ajax" role="form" action="/book/add" method="POST">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title" id="myModalLabel">添加</h4>
</div>
<div class="modal-body" id="div_form_text">
<div class="form-group">
<label for="txt_name" class="col-sm-2 control-label">名称:</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="txt_name" name="name">
</div>
</div>
</div>
<div class="modal-body" id="div_form_area" style="display: none;">
<div class="form-group">
<div class="col-sm-10">
<textarea rows="10" cols="50"></textarea>
<div>*每行输入一个单词,回车换行输入多个单词</div>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
<button type="submit" class="btn btn-primary">提交</button>
</div>
</form>
</div>
</div>
</div>
Look at this article http://segmentfault.com/q/1010000000364871
sorry ,my English is not good.I try to explain what I mean . when
"form class='ajax ... '" contains "input type='hidden' ...." and in js file modify input vlaue or
Will cause the error