0
  <div id="dialog"></div>

    <table>


        <tr>
            <td style="text-align: right">

                   @Html.ActionLink("Craete New Set1", "CreateNewSet1", "ClaimAuditAdmin", null, new{ @class = "openDialog", data_dialog_id = "emailDialog", data_dialog_title = "Create New Claim Audit Set"})
            </td>
            <td>


</td>
        </tr>

  $.ajaxSetup({ cache: false });

  $(document).ready(function () {
      $(".openDialog").live("click", function (e) {
          e.preventDefault();
         // $(".divContainer")
          // $("<div></div>")
          $("#dialog")
             // .addClass("dialog")
              .attr("id", $(this).attr("data-dialog-id"))
              .appendTo("body")
              .dialog({
                  title: $(this).attr("data-dialog-title"),
                  close: function () { $(this).remove() },
                  modal: true,
                  height: 325,
                  width: 325,
                  draggable: true,
                  resizable: false,
                  position: 'center',
                  scrollable:false
              })

              .load(this.href);
      });

      $(".close").live("click", function (e) {
          e.preventDefault();
          $(this).closest(".dialog").dialog("close");

      });
  });

MVC 中的 Jquery PopUp 在 Chrome 中显示但在 IE 中不显示。在 IE 中也没有显示问题。

4

1 回答 1

1

尝试一次,基本上,您首先从其他页面“加载”内容。

  $("#dialog")
  .load(this.href)
  .dialog({
          autoOpen: false
  }).open();

或者

  var link = this.href;
  $("#dialog")
  .dialog({
          open: function (event, ui) {
                $(this).load(link);
            },
  });
于 2013-06-03T05:48:16.937 回答