0
작동하지 않습니다JQuery와 대화 상자가 내 헤더에 포함했다
ReferenceError: jQuery is not defined
factory(jQuery);
<body>
<script>
$.extend({ alert: function (message, title) {
$("<div></div>").dialog({
buttons: { "Ok": function() { $(this).dialog("close"); } },
close: function (event, ui) { $(this).remove(); },
resizable: false,
title: title,
modal: true
}).text(message);
}
});
$.alert('message', 'fileName');
</script>
</body>
을
내 코드에서 대화 상자가 작동하지 않는 이유가 확실하지 않습니다. 내 대본에 뭔가 빠져 있거나 다른 것이 문제일까요?
<head>
<script type="text/javascript" src="jquery/jquery-3.1.1.js"></script>
<script type="text/javascript" src="jquery/jquery-ui.js"></script>
<link rel="stylesheet" type="text/css" href="jquery/jquery-ui.css">
<link rel="stylesheet" type="text/css" href="jquery/jquery-ui.structure.css">
<link rel="stylesheet" type="text/css" href="jquery/jquery-ui.theme.css"></script>
</head>
의 버전을 사용할 수 있습니다 (jQuery를 UI는 jQuery를 사용하기 때문에 jQuery를 먼저로드해야하기 때문에) JQuery와 스크립트 후 jQuery를 UI 스크립트를 포함
UI 스크립트와 버전을 다운로드 할 수 있습니까? –
http://jqueryui.com/download/ 여기에서 최신 버전 –
을 사용해보십시오. 한 가지 더요, jQuery 스크립트의 정규 버전과 축소 버전을 모두 포함해야하는 이유는 무엇입니까? 제거하십시오. –