我正在运行查询并将结果加载到表中以供显示。一些查询正在提取相同的数据,但它在表格中的显示方式不同。例如,联系人在3个表中的1个上显示不同。这些表格显示在iframes
中,来自不同的网页。
table, td, th {
border: 1px solid green;
text-align: center;
padding: 1px;
}
th {
background-color: green;
color: white;
}
table {
margin-left: auto;
margin-right: auto;
}
iframe {
display: block; /*new*/
margin: auto;
border: none; /*revised*/
width: 800px;
height: 200px;
}
div.center p {
text-align: center;
} /*new*/
<div class="center">
<p>
<button onclick="myFunction1()">Current Projects</button>
<button onclick="myFunction2()">Completed Projects</button>
<button onclick="myFunction3()">Projects in Final Review</button>
</p>
</div>
<script>
var iframeExists = false;
function myFunction1() {
var x
if (!iframeExists) {
x = document.createElement("IFRAME");
iframeExists = true;
} else {
x = document.getElementsByTagName("IFRAME")[0];
}
x.setAttribute("src", "http://www.oldgamer60.com/Project/CurrentProjects.php");
document.body.appendChild(x);
}
function myFunction2() {
var x;
if (!iframeExists) {
x = document.createElement("IFRAME");
iframeExists = true;
} else {
x = document.getElementsByTagName("IFRAME")[0];
}
x.setAttribute("src", "http://www.oldgamer60.com/Project/CompletedProjects.php");
document.body.appendChild(x);
}
function myFunction3() {
var x;
if (!iframeExists) {
x = document.createElement("IFRAME");
iframeExists = true;
} else {
x = document.getElementsByTagName("IFRAME")[0];
}
x.setAttribute("src", "http://www.oldgamer60.com/Project/ProjectsInFinalReview.php");
document.body.appendChild(x);
}
</script>