Javascript 无法使用jquery post方法加载引导模式

Javascript 无法使用jquery post方法加载引导模式,javascript,jquery,html,jsp,Javascript,Jquery,Html,Jsp,我有一个主要的jsp页面,这里我有6个输入,在每个输入的点击上我有一个jquery onClick函数,在这里我使用jquery post方法加载一个jsp页面,在这个页面中我调用db函数来获取数据,然后将其显示为引导模式 代码编写如下所示: $("#simplesearchporginputid").click(function (event) { try { //if($("#autosearchlist1").attr("for")== "purchaseorg")

我有一个主要的jsp页面,这里我有6个输入,在每个输入的点击上我有一个jquery onClick函数,在这里我使用jquery post方法加载一个jsp页面,在这个页面中我调用db函数来获取数据,然后将其显示为引导模式

代码编写如下所示:

$("#simplesearchporginputid").click(function (event) {
    try {
        //if($("#autosearchlist1").attr("for")== "purchaseorg")
        //{
        //}else
        //{
        //}
        $.post("AutoSearchPurchOrgList.jsp", {}, function (data) {
            alert(data);
            // $("#autosearchlist1").attr("for","purchaseorg"); 
            $("#autosearchlist1").html(data);
            $('#PurhcaseOrgModal').modal('show');
        });
    }
    catch (err) {
        document.getElementById("DisplayErrorMessage").innerHTML = err.message;
        console.log(err.message);
    }
}); 
这里,autosearch list是主标记中的一个div id,我从
autosearchpurchorglist.jsp
加载数据,在这个加载的数据中,我有一个引导模式,id为PurchaseOrgModal,然后我使用
$('#PurchaseOrgModal').modal('show')

但它不工作,相反,屏幕上加载了透明的黑色空屏幕,我可以在主jsp中看到输入和其他内容,但无法单击它们等等。。。请帮我解决这个问题

HTML模式是:

<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ page import="java.util.*"%>
<%@ page import="*******.jco.*"%>
<%@ page import="com.*****.*"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Purchase Org Autosearch List</title>
 <script>


 </script>
</head>
 <body>

  <!-- Auto search feature -->
        <%

        GBSServletRequest.g_obj_Request = request;
        GBSServletRequest.g_obj_Respons = response;
        SmartSearch smartSearchObject = new SmartSearch();
        Log logobject = new Log();

        %>

        <div class="modal fade" id="PurhcaseOrgModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true"><img src="IMG/*******" /></button>
        <h4 class="modal-title" id="myModalLabel">Select <span id="which_country"></span> Purch Org #</h4>
      </div>
      <div class="modal-header-search">
         <label>Enter Key Word</label> <input type="text" placeholder="" title="" value="" class="dd_search_country">
      </div>
      <%

      JCO.Table purchaserOrgIdTable = smartSearchObject.getlistofPurchaseorgID();
      %>
      <div class="modal-body countylist_tcode">
        <table width="100%" cellpadding=20 cellspacing=0  border=0 class="countrylist country">
        <tr>
        <th></th>
        <th></th>
        </tr>      
        <% 
         try
         {
             purchaserOrgIdTable.setRow(0);

             do{ 
              String purch_org_desc = (String) purchaserOrgIdTable.getString(IConstants.******);
              String purch_org_key = (String)purchaserOrgIdTable.getString(IConstants.*******);
              String purch_org_key_desc = (String)purchaserOrgIdTable.getString(IConstants.**************);
       %>

             <tr>
             <%String keyvalue = purch_org_key ; %>
              <td 
              data-search_country="<%=purch_org_desc %>" 
              data-search_country_code="<%=purch_org_key%>" 
              class="countryli">
              <input type="radio" 
              value="<%=purch_org_key %>" 
              data-search_country="<%=purch_org_desc %>" 
              data-search_country_code="<%=purch_org_key%>" 
              class="country_radio_btn country_check_btn" name="country"> 
              <span class="td">
              <%=purch_org_key_desc %>
              </span>
              </td>
              <%purchaserOrgIdTable.nextRow(); %>
              <td></td>
              <td></td>
              <td></td>
              <td></td>
              <td></td>

              <td 
              data-search_country="<%=purch_org_desc%>" 
              data-search_country_code="<%=purch_org_key%>">
              <input type="radio" 
              value="<%= purch_org_key%>" 
              data-search_country="<%= purch_org_desc %>" 
              data-search_country_code="<%= purch_org_key%>" 
              class="country_radio_btn country_check_btn" 
              name="country"> 
              <span class="country_name">
              <%=purch_org_key_desc %>
              </span>

              </tr>
               <%
            }while(purchaserOrgIdTable.nextRow());
          }catch(Exception e)
             {

             }
        %>
          </table> 

       <div class="nomatch"></div>

      </div>
      <div class="BookMarkmodal-footer">

        <button type="button" class="btn btn-primary" id="submit_checked_val" data-dismiss="modal" aria-hidden="true">Submit</button>
      </div>
    </div>
  </div>
</div>
</body>
</html>

采购组织自动搜索列表
选择采购组织#
输入关键字
提交

It;这更像是HTML问题,听起来像是模态叠加造成的问题。你可以发布模态HTMLhi shehary,上面添加了模态代码吗