这个表是手动创建的,我希望"Dinamico“大小写中的每个html文档都自动出现在表中。每次我有一个新的html页面时,它都应该创建一个新的"tr“元素。
<table cellspacing="0" cellpadding="0" border="0" class="table">
<tr>
<th>Esquema de MetaDados</th>
<th>Descrição</th>
</tr>
<tr>
<td><a strong href="Templates/MetaDadosVideo/template_Video.html">Metadados Video</a></td>
<td>Catalogação e arquivo de conteúdos de Videos de Concerto, entrevistas</td>
</tr>
<tr>
<td><a strong href="Templates/MetaDadosGráficos/template_gráficos.html">Metadados Materiais Gráficos</a></td>
<td>Arquivo de Materias Gráficos Finais</td>
</tr>
<tr>
<td><a strong href="#">Metadados Porto 2001</a></td>
<td>Conteudos da Porto 2001</td>
</tr>
<tr>
<td><a strong href="Templates/Dinamico/formD1.html">Metadados Dinamico</a></td>
<td>Conteudos da Porto 2001</td>
</tr>
</table>另外,当他选择一个模板时,iframe会将"page.html“更改为选中的用户选项。我怎样才能做到这一点?
<!DOCTYPE html>
<html id="the">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="../../CSS/form.css">
</head><body style="background-color:white;">
<script>
var Nome; // Nome do esquema
var Desc; // descrição do esquema
var temas = []; // Nome dos temas do form
var fields = []; // nr de campos
var FL= []; // Nome do campo
var TF =[]; // tipo do campo
</script>
<div>
<iframe src="../../Resources/logo-cm__.png" frameBorder="0" width="30%" height="80px" align="left" scrolling="mo"
/>
</iframe>
</div>
<div>
<iframe src="../../Resources/title.png" frameBorder="0" width="60%" height="80px" align="center" scrolling="no" />
</iframe>
</div>
<div>
<iframe src="page.html" frameBorder="0" width="70%" height="600px" align="left" scrolling="no" />
</iframe>
</div>
<div>
<iframe src="../../galeria/frame2_galeria.html" frameBorder="0" width="29%" height="600px" align="right" scrolling="yes" />
</iframe>
</div>
<a onclick="this.href='data:text/html;charset=UTF-8,'+encodeURIComponent(document.documentElement.outerHTML)" href="#" download="page.html">Download Template</a>
</body>
</html>发布于 2018-11-23 18:14:59
例如,您可以为每个html创建一个动态表,并为表的列提供文件名。在某个文件中,为每个存储html文件的目录提供路径。
foreach (glob("omething*.htm") as $filename) {
foreach(glob("Templates/Dinamico/*.txt") as $txtname){
$fileH= basename($filename,".htm");
if($filename != "something.html"){
echo'<tr>';
echo'<td>';
echo "<a name='".$fileH."'strong href='something.php?id=$fileH'>".$fileH."</a>";
echo'</td>';
echo'<td>';
echo $txt;
echo'</td>';
echo'</tr>';https://stackoverflow.com/questions/50588176
复制相似问题