Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/429.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
Javascript 如何在新的浏览器选项卡中加载引导_Javascript_Jquery_Bootstrap Modal - Fatal编程技术网

Javascript 如何在新的浏览器选项卡中加载引导

Javascript 如何在新的浏览器选项卡中加载引导,javascript,jquery,bootstrap-modal,Javascript,Jquery,Bootstrap Modal,我正在运行一个代码,该代码将刮取一个表单,然后打开一个新的浏览器选项卡,其中包含使用以下格式的数据:fieldID、fieldLabel、filedValue jQuery(document).ready(function(){jQuery('#helpdesk_ticket_submit').on('click', function(e){ submitText = "<table class='table'>" submitText += ` <

我正在运行一个代码,该代码将刮取一个表单,然后打开一个新的浏览器选项卡,其中包含使用以下格式的数据:fieldID、fieldLabel、filedValue

jQuery(document).ready(function(){jQuery('#helpdesk_ticket_submit').on('click', function(e){
  submitText = "<table class='table'>"
  submitText += `  <thead>
                    <tr>
                      <th scope="col">fieldID</th>
                      <th scope="col">fieldLabel</th>
                      <th scope="col">fieldValue</th>
                    </tr>
                  </thead>
                  <tbody>`
  
  jQuery('#new_helpdesk_ticket input, #new_helpdesk_ticket select, #new_helpdesk_ticket textarea').each(
    function(index){  
        var input = jQuery(this);
        if (input.prev().is('textarea'))
          if (input.attr('class').indexOf('hide') >= 0) 
            return;
        let label =  extractLabelText(input.attr('id')) //extrenal function to get the label of the field
        submitText += "<tr><td>" + input.attr('id') + "</td><td>" + label  + "</td><td> " + input.val() + "</td></tr>"
    }
    
  );

  window.open().document.write(submitText);

代码没有问题。我的问题是何时执行window.open.document.writesubmitText;如何使用引导设置表的格式?

很可能接近您想要执行的操作。如果您使用从CDN传递到引导css的链接开始提交文本,该怎么办?这能实现你想要的吗?提交文本=