Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/445.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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/70.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未在使用ModalPopup(Jquery)的弹出窗口中执行_Javascript_Jquery_Html_Modalpopup - Fatal编程技术网

JavaScript未在使用ModalPopup(Jquery)的弹出窗口中执行

JavaScript未在使用ModalPopup(Jquery)的弹出窗口中执行,javascript,jquery,html,modalpopup,Javascript,Jquery,Html,Modalpopup,我通过JQuery库中的对象ModalPopup创建了一个简单的弹出窗口。 这是一个简单的按钮点击事件。 我的问题是弹出窗口中的“Javascript”没有运行!当我以一个简单的html页面打开弹出窗口时,它甚至可以完美地运行 $(".details_company").click(function () {   $("#dialog-modal").dialog({     height: 140,     modal: true   }); }); <div id="dialog-m

我通过JQuery库中的对象ModalPopup创建了一个简单的弹出窗口。 这是一个简单的按钮点击事件。 我的问题是弹出窗口中的“Javascript”没有运行!当我以一个简单的html页面打开弹出窗口时,它甚至可以完美地运行

$(".details_company").click(function () {
  $("#dialog-modal").dialog({
    height: 140,
    modal: true
  });
});

<div id="dialog-modal" title="Basic modal dialog">
  <p>Adding the modal overlay screen makes the dialog look more prominent because it dims out the page content.</p>
</div>
我使用以下代码创建弹出窗口:

$(document).ready(function () {
  //Change these values to style your modal popup

  var align = 'center'; //Valid values; left, right, center
  var top = 100; //Use an integer (in pixels)
  var width = 520; //Use an integer (in pixels)
  var padding = 10; //Use an integer (in pixels)
  var backgroundColor = '#FFFFFF'; //Use any hex code                                                           
  var borderColor = '#333333'; //Use any hex code
  var borderWeight = 4; //Use an integer (in pixels)
  var borderRadius = 5; //Use an integer (in pixels)
  var fadeOutTime = 300; //Use any integer, 0 = no fade
  var disableColor = '#666666'; //Use any hex code
  var disableOpacity = 40; //Valid range 0-100
  var loadingImage = 'images/loading.gif'; //Use relative path from this page
  var source = 'details_company.html';

  //This method initialises the modal popup

  $(".details_company").click(function () {
    modalPopup(align, top, width, padding, disableColor, disableOpacity, backgroundColor, borderColor, borderWeight, borderRadius, fadeOutTime, source, loadingImage);
  });
});
$(".details_company").click(function () {
  $("#dialog-modal").dialog({
    height: 140,
    modal: true
  });
});

<div id="dialog-modal" title="Basic modal dialog">
  <p>Adding the modal overlay screen makes the dialog look more prominent because it dims out the page content.</p>
</div>
我为我的英语不好而道歉

$(“.details\u company”)。单击(函数(){
$(".details_company").click(function () {
  $("#dialog-modal").dialog({
    height: 140,
    modal: true
  });
});

<div id="dialog-modal" title="Basic modal dialog">
  <p>Adding the modal overlay screen makes the dialog look more prominent because it dims out the page content.</p>
</div>
$(“#对话框模式”).dialog({ 身高:140, 莫代尔:对   }); }); 添加模式覆盖屏幕会使对话框看起来更加突出,因为它会使页面内容变暗

$(".details_company").click(function () {
  $("#dialog-modal").dialog({
    height: 140,
    modal: true
  });
});

<div id="dialog-modal" title="Basic modal dialog">
  <p>Adding the modal overlay screen makes the dialog look more prominent because it dims out the page content.</p>
</div>
这使用jquery ui(“.details\u company”)。单击(函数(){
$(".details_company").click(function () {
  $("#dialog-modal").dialog({
    height: 140,
    modal: true
  });
});

<div id="dialog-modal" title="Basic modal dialog">
  <p>Adding the modal overlay screen makes the dialog look more prominent because it dims out the page content.</p>
</div>
$(“#对话框模式”).dialog({ 身高:140, 莫代尔:对   }); }); 添加模式覆盖屏幕会使对话框看起来更加突出,因为它会使页面内容变暗

$(".details_company").click(function () {
  $("#dialog-modal").dialog({
    height: 140,
    modal: true
  });
});

<div id="dialog-modal" title="Basic modal dialog">
  <p>Adding the modal overlay screen makes the dialog look more prominent because it dims out the page content.</p>
</div>

这使用了jquery ui

,请看一下这个jquery ui示例。它简单易懂。

看看这个jQueryUI示例。它简单易懂。

哇,在查看jquery网站上的模态对话框示例之前,您已经做了所有这些了?您缺少了modalpoup的定义。我们应该如何帮助?没有运行的JS在哪里?控制台上的错误?请确保你的问题包含更多细节。这个JS没有运行:它没有执行,也不取决于JS的外观,这就是为什么没有提到它。thxwow,在查看jquery站点的模态对话框示例之前,您已经做了所有这些了?您缺少了modalpoup的定义。我们应该如何帮助?没有运行的JS在哪里?控制台上的错误?请确保你的问题包含更多细节。这个JS没有运行:它没有执行,也不取决于JS的外观,这就是为什么没有提到它。thxi在phone中不起作用(这是一个phoneGap应用程序),此外,我需要在弹出窗口中添加一个包含表单的新页面。thxi在phone中不起作用(这是一个phoneGap应用程序),此外,我需要在弹出窗口中添加一个包含表单的新页面。谢谢
$(".details_company").click(function () {
  $("#dialog-modal").dialog({
    height: 140,
    modal: true
  });
});

<div id="dialog-modal" title="Basic modal dialog">
  <p>Adding the modal overlay screen makes the dialog look more prominent because it dims out the page content.</p>
</div>