boostrap框架小细节

Posted Talk is cheap. Show me the cod

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了boostrap框架小细节相关的知识,希望对你有一定的参考价值。

1、Boostrap模态框保存后隐藏

1 $("#vacationmodel").modal(‘hide‘);

2、Boostrap模态框保存后第二次点击显示旧数据

//在保存按钮事件执行末尾调用clearForm即可
clearForm($("#vacationForm"));、

//清空文本框内容
    function clearForm(form) {
        // input清空
        $(‘:input‘, form).each(function () {
            var type = this.type;
            var tag = this.tagName.toLowerCase(); // normalize case
            if (type == ‘text‘ || type == ‘password‘ || tag == ‘textarea‘)
                this.value = "";
                // 多选checkboxes清空
                // select 下拉框清空
            else if (tag == ‘select‘)
                this.selectedIndex = -1;
        });
    };

 

以上是关于boostrap框架小细节的主要内容,如果未能解决你的问题,请参考以下文章