Hola que tal!!.
Se puede extraer un valor desde un iframe? Explico:
Tengo esta pagina:
Código HTML:
<html>
<head>
<script language="JavaScript" type="text/javascript">
function ver(){
var oFrame = document.getElementById('cat');
alert(oFrame.document.getElementById('dato').value);
}
</script>
</head>
<body>
<form id="forma">
<iframe src="contenido.php" id="cat" width="100%"></iframe>
<input type="button" value="ver" onclick="return ver()">
</form>
</body>
</html>
El contenido del iframe es este:
Código HTML:
<html>
<body>
<form id="forma">
<input type="hidden" id="dato" value="Hola mundo!!">
</form>
</body>
</html>
Y al pincharle no me muestra nada
¿Si se puede hacer algo smejante?