Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/variables/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Bootstrap 4 从bootstrap 4.modal对话框上的按钮设置窗体操作_Bootstrap 4_Modal Dialog - Fatal编程技术网

Bootstrap 4 从bootstrap 4.modal对话框上的按钮设置窗体操作

Bootstrap 4 从bootstrap 4.modal对话框上的按钮设置窗体操作,bootstrap-4,modal-dialog,Bootstrap 4,Modal Dialog,我无法在模态中的窗体上设置操作。 我在获取数据方面没有问题,但我就是无法设置表单操作值 function.js: $(document).ready(function () { $("#myModal").on("show.bs.modal", function (e) { del_id = $(e.relatedTarget).data("id"); tit = $(e.relatedTarget).data

我无法在模态中的窗体上设置操作。 我在获取数据方面没有问题,但我就是无法设置表单操作值

function.js:

 $(document).ready(function () {
$("#myModal").on("show.bs.modal", function (e) {
    del_id = $(e.relatedTarget).data("id");
        tit = $(e.relatedTarget).data("nm");
        $(this).find("span").html(tit);

        $('#delete').click(function() {
            $(this).find(".form action").val;
            $(this).find(".action").val = del_id;

        })
        })
        })
html:

我在警报窗口中看到一个奇怪的代码:

function(n){var r,e,i,t=this[0];return arguments.length?(i=m(n),this.each(function(e){var t;1===this.nodeType&&(null==(t=i?n.call(this,e,S(this).val()):n)?t="":"number"==typeof t?t+="":Array.isArray(t)&&(t=S.map(t,function(e){return null==e?"":e+""})),(r=S.valHooks[this.type]||S.valHooks[this.nodeName.toLowerCase()])&&"set"in r&&void 0!==r.set(this,t,"value")||(this.value=t))})):t?(r=S.valHooks[t.type]||S.valHooks[t.nodeName.toLowerCase()])&&"get"in r&&void 0!==(e=r.get(t,"value"))?e:"string"==typeof(e=t.value)?e.replace(xt,""):null==e?"":e:void 0}
还使用:

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/js/bootstrap.min.js"></script>

我想问题一定出在你身上

$(this.find(“.action”).val

但我不知道该怎么办

function(n){var r,e,i,t=this[0];return arguments.length?(i=m(n),this.each(function(e){var t;1===this.nodeType&&(null==(t=i?n.call(this,e,S(this).val()):n)?t="":"number"==typeof t?t+="":Array.isArray(t)&&(t=S.map(t,function(e){return null==e?"":e+""})),(r=S.valHooks[this.type]||S.valHooks[this.nodeName.toLowerCase()])&&"set"in r&&void 0!==r.set(this,t,"value")||(this.value=t))})):t?(r=S.valHooks[t.type]||S.valHooks[t.nodeName.toLowerCase()])&&"get"in r&&void 0!==(e=r.get(t,"value"))?e:"string"==typeof(e=t.value)?e.replace(xt,""):null==e?"":e:void 0}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/js/bootstrap.min.js"></script>