<!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Abrir Arquivos Temporários</title>
<style>
body {
font-family: Arial, sans-serif;
text-align: center;
background-color: #f9f9f9;
margin: 0;
padding: 20px;
}
h1 {
color: #333;
}
input[type="file"] {
margin: 20px;
padding: 10px;
border: 1px solid #ccc;
border-radius: 5px;
}
iframe {
margin-top: 20px;
border: 1px solid #ccc;
width: 90%;
height: 500px;
border-radius: 8px;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
</style>
</head>
<body>
<h1>Abrir Arquivos HTML Temporários</h1>
<p>Selecione um arquivo HTML do seu computador para visualizá-lo abaixo.</p>
<input type="file" id="fileInput" accept=".html">
<iframe id="preview" title="Pré-visualização do Arquivo"></iframe>
<script>
document.getElementById('fileInput').addEventListener('change', function(event) {
const file = event.target.files[0];
const iframe = document.getElementById('preview');
if (file && file.type === 'text/html') {
const fileURL = URL.createObjectURL(file);
iframe.src = fileURL; // Define o arquivo como a fonte do iframe
} else {
alert('Por favor, selecione um arquivo HTML válido.');
}
});
</script>
<h1>salvar todos os arquivos como <br>open_local.html <br>para abrir nesta pagina</h1>
</body>
</html>