【发布时间】:2015-08-02 15:47:08
【问题描述】:
我正在使用三种不同的方法来重置我的表单,但单击按钮后仍然没有任何反应,这是我的表单结构: 任何帮助将不胜感激
$this->load->helper('form');
$attributes = array('class' => 'form-inline', 'id' => 'ProductForm');
echo form_open_multipart("product/process/$id",$attributes);
.
.
.
<?php echo form_reset(array('id'=>'reset','value'=>'resetme'));?>
<button onclick="ResetForm();">Reset Form</button>
<button type="reset" value="Reset">Reset</button>
<?php echo form_close();?>
<script>
function ResetForm() {
document.getElementById("ProductForm").reset() ;
}
</script>
//same for form_open()
【问题讨论】:
标签: php forms codeigniter reset