I want to change the contents of a div When a user clicks on a link. To do that, I tried using the following code :
function openModal() {
el = document.getElementById("modal");
el.style.visibility = "visible";
}
function showContent(id) {
openModal();
$("#modal").load("modal/id.php");
return false;
}
However, it doesn't change "modal/id.php"
to "modal/something.php"
and, in place of that, opens a file named id.php
in the modal directory. How can I change that?
Not sure to understand what's your question. Perhaps this's the answer.
PHP
echo "This other text is inside a PHP script";
HTML
Please provide the rest of your code. It sounds like it may just be an ID oversight.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.