小编Kri*_*ani的帖子

如何将java脚本变量作为值加载到引导模型文本框中

我在将 javascript 变量加载到引导程序模型输入框中时遇到了一些问题:

setTimeout(function() {
  swal({
      title: "OverTime Status!",
      text: "You Need to get Sub OT Approval " + data.value + " Hours to Time allocate in the department",
      type: "warning",
      confirmButtonText: "OK"
    },
    function(isConfirm) {
      if (isConfirm) {

        $('#hours_work').val(data.value); //data.value alert the correct value in here.but this value not load in to the bootstrap model text box 
        $('#overtime_requset').modal('show');
        clear_field();
      }
    });
}, 1);
Run Code Online (Sandbox Code Playgroud)
<div class="modal" id="overtime_requset">
  <div class="modal-dialog ">
    <form id="overtime_requset_form">
      <div class="modal-content">

        <!-- Modal Header -->
        <div class="modal-header"> …
Run Code Online (Sandbox Code Playgroud)

javascript php input bootstrap-modal sweetalert

13
推荐指数
1
解决办法
1072
查看次数

标签 统计

bootstrap-modal ×1

input ×1

javascript ×1

php ×1

sweetalert ×1