The idea is that if I have two HTML pages I can join them, and I can call their methods and the DOM between both pages, without using a controller like PHP
Example:
pagina1.html
<!DOCTYPE html>
<html>
<head>
<title>Ejemplo</title>
<script>
function FuncionPagina1(){
return "mundo";
}
</script>
</head>
<body>
<h1 id="mundo" class="mundoClass">MUNDO!!!</h1>
</body>
</html>
pagina2.html
<!DOCTYPE html>
<html>
<head>
<title>Ejemplo</title>
<script>
function FuncionPagina1(){
return "hola";
}
</script>
</head>
<body>
<h1 id="hola" class="holaClass">Hola</h1>
</body>
</html>
How can I join pagina1 and pagina2 , and be able to call with simple access to them as if they were on the same page? By this I mean that if I'm standing on the page1 , I can call id="mundo"
or class="mundoClass"
and vice versa, which page2 can call its own id
and class
, and if possible even its JavaScript functions.
Note : It should be noted that the idea is to be without iframe