我通过 JQuery 库中的对象 ModalPopup 创建了一个简单的弹出窗口。这是一个简单的按钮单击事件的事件。我的问题是弹出窗口中的“Javascript”没有运行!当我将弹出窗口作为一个简单的 html 页面打开时,它甚至可以完美运行。
我使用以下代码创建弹出窗口:
$(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);
});
});
我为我糟糕的英语道歉。