如何使用javascript提交表单

时间:2019-04-04 10:52:54

标签: javascript

当我单击生成发票时,我想保存0值,而当我单击取消时,我想使用javascript将1保存到数据库中。

<div class="form-group">
   <button class="btn btn-primary" type="submit" name="generate_invoice" value="yes" onClick="generate();" ><?php echo lang('generate_invoice'); ?></button>
</div>

在弹出窗口中

<div class="modal-content">
        <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
            <h4 class="modal-title">
                <?php echo lang('Invoice_conform'); ?>
            </h4>
        </div>
        <div class="modal-body">

        </div>
        <div class="modal-footer">
            <button type="button" class="btn btn-danger bulk_no del_success">
                <?php echo lang('cancel'); ?>
            </button>
            <button type="button" class="btn btn-primary bulk_yes">
                <?php echo lang('continue'); ?>
            </button>
        </div>
    </div>

enter image description here

0 个答案:

没有答案