echo '<div id="myModal" class="modal">';
echo'<div class="modal-content">
<span class="close">×</span>';
echo "Вам предложение бракосочетания</span> <span class="ank_d"><a href='/moduls.zags/edit.php?act=da'>Принять</a> | </span>";
echo "<a href='/moduls.zags/edit.php?act=net'>Отказатся</a></span><br />";
echo "</div></div>";
// Get the modal
var modal = document.getElementById('myModal');
// Get the button that opens the modal
var btn = document.getElementById("myBtn");
// Get the <span> element that closes the modal
var span = document.getElementsByClassName("close")[0];
// When the user clicks the button, open the modal
btn.onclick = function() {
modal.style.display = "block";
}
// When the user clicks on <span> (x), close the modal
span.onclick = function() {
modal.style.display = "none";
}
// When the user clicks anywhere outside of the modal, close it
window.onclick = function(event) {
if (event.target == modal) {
modal.style.display = "none";
}
}
// Get the modal
var modal = document.querySelectorAll('#myModal, #myModal_2');
// Get the button that opens the modal
var btn = document.querySelectorAll("#myBtn, #myBtn_2");
// Get the <span> element that closes the modal
var span = document.getElementsByClassName("close")[0];
// When the user clicks the button, open the modal
btn.onclick = function() {
modal.style.display = "block";
}
// When the user clicks on <span> (x), close the modal
span.onclick = function() {
modal.style.display = "none";
}
// When the user clicks anywhere outside of the modal, close it
window.onclick = function(event) {
if (event.target == modal) {
modal.style.display = "none";
}
}
?>
<div id="myModal" class="modal">
<div class="modal-content">
<span class="close">×</span>
Вам предложение бракосочетания</span> <span class="ank_d"><a href="/moduls.zags/edit.php?act=da">Принять</a> | </span>
<a href="/moduls.zags/edit.php?act=net">Отказатся</a></span><br />
</div></div>
<div id="myModal_2" class="modal">
<div class="modal-content">
<span class="close">×</span>
Вам предложение бракосочетания №2</span> <span class="ank_d"><a href="/moduls.zags/edit.php?act=da">Принять</a> | </span>
<a href="/moduls.zags/edit.php?act=net">Отказатся</a></span><br />
</div></div>
<?php
echo '<div id="myModal" class="modal">';
echo'<div class="modal-content">
<span class="close">×</span>';
echo "Вам предложение бракосочетания</span> <span class="ank_d"><a href='/moduls.zags/edit.php?act=da'>Принять</a> | </span>";
echo "<a href='/moduls.zags/edit.php?act=net'>Отказатся</a></span><br />";
echo "</div></div>";
// Get the modal
var modal = document.getElementById('myModal');
// Get the button that opens the modal
var btn = document.getElementById("myBtn");
// Get the <span> element that closes the modal
var span = document.getElementsByClassName("close")[0];
// When the user clicks the button, open the modal
btn.onclick = function() {
modal.style.display = "block";
}
// When the user clicks on <span> (x), close the modal
span.onclick = function() {
modal.style.display = "none";
}
// When the user clicks anywhere outside of the modal, close it
window.onclick = function(event) {
if (event.target == modal) {
modal.style.display = "none";
}
}