1
我有一個php文件tha給我從mysql顯示pdf文件的可能性現在我想在HTML文件中顯示該div中的div這是我在javascript中的功能012idvar id ;如何在html div中顯示pdf文件
function displayNotes() {
//id=localStorage.getItem("userid");
id = 160;
var urlString = "id=" + id;
$.ajax({
url : "http://localhost/notePdf.php",
type : "GET",
cache : false,
data : urlString,
success : function(response) {
console.log(response);
document.getElementById("pdf").innerHTML = response;
}
});
}
,這是我在HTML DIV
<div class="content">
<div id="form">
<form action="" id="contactForm" method="post">
<span>Email</span>
<input type="text" name="email" class="email" placeholder="Enter your email" tabindex=2 />
<span>Email</span>
<input type="text" name="email" class="email" placeholder="Enter your email" tabindex=2 />
<span>Message</span>
<textarea class="message" tabindex=4 id="pdf"></textarea>
<input type="submit" name="submit" value="Send e-mail" class="submit" tabindex=5>
</form>
</div>
</div>
我從php中獲取pdf文件,它選擇了mysql數據庫中的所有信息 – Amal