Sólo falta que funcione en Ópera, y que aparezca el doctype en IE; a ver quién nos ayuda:
Código:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Documento sin título</title>
<script>
function ver(){
merd=document.all ? true : false;
w=window.frames.pepe;
w2=document.getElementById("pepe");
if(merd){
w.document.clear();
w.document.open('text/plain');
w.document.write(document.documentElement.outerHTML);
w.document.close();
}else{
w2.src="view-source:"+window.location.href;
}
}
</script>
</head>
<body>
<p><a href="javascript:ver()">view-source
</a></p>
<iframe width="500" height="500" name="pepe" id="pepe"></iframe>
</body>
</html>