こんにちはjqueryダイアログポップアップ(モーダル)をポップアップ内の他のページに変更することができます(存在するポップアップの他のページをロードしてください)jqueryのダイアログモーダル変更ページがモーダル内にありますか?
私はtest3.phpをモーダルの中にロードする方法を知りませんここ
test2.php
でのコーディングはtest1.php私の試みである
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>jQuery UI Dialog - Default functionality</title>
<link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
<link rel="stylesheet" href="/resources/demos/style.css">
<script src="https://code.jquery.com/jquery-1.12.4.js"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
</head>
<body>
<button id="btn">Click to Popup</button>
<div id="dialog" title="Basic dialog">
here
</div>
<script>
$(function() {
$("#dialog").dialog({
open: function(event, ui) {
$('#dialog').load('test2.php', function() {
alert('Load was performed.');
});
},
modal: true,
autoOpen: false,
title: "jQuery Dialog",
width: 600,
height: 350
});
$("#btn").click(function(){
$('#dialog').dialog('open');
});
});
</script>
</body>
</html>
test2.php
this is test2.php page <br/>
<a href="test3.php"> Go to Page test3.php </a>
test3.php
<p> this is test3.php page </p>
ブラウザのコンソールを確認してください。間違いを見てくださいか? –
いいえいいえtest2.phpに2行のコードしかないので、test2.phpページのコード.load()を書く方法が分かりません – doflamingo