En un esfuerzo por hacer la página, trabajar con Safari, Firefox y el IE me han tratado dos soluciones.
Ayuda mucho tenerlo,
1. Mover la función de establecer por separado un. Js archivo. Este parece ser el mejor enfoque, pero cualquiera de los. Js ha producido un error o no sé cómo llamarlo.
Una versión de código y. Js a continuación.
2. El uso de "si" y "si" "si no". Hasta ahora no he sido capaz de encontrar uno de estos que separará Safari, IE, Firefox, etc
<! DOCTYPE html PUBLIC "- / / W3C / / DTD XHTML 1,0 Transición / / EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-Transitional.dtd">
<html xmlns = "http://www.w3. org/1999/xhtml "lang =" en "xml: lang =" en ">
<head>
<META http-equiv="Content-Type" content="text/html;charset=utf-8" />
<title> Test File </ title>
<script type="text/javascript" src="loadlargeview.js"> </ script>
<link href="loadlargeviewcopy.js" rel="javascript" type="text/javascript" />
<link href = "índice. css "rel =" stylesheet "type =" text / css "/>
</ head>
<body>
<table align="center" width="650">
<tr>
<TD>
<center>
<a href="loadLargeViewcopy.js(images/irisflower.jpg,Large View, 650, 848, 500, 500)">
<img src = "images / irisflower_small. jpg "alt =" imagen "width =" 160 "altura =" 209 "align =" de abajo "/>
<br />
Ver <strong> grande </ strong>
</ a>
</ center>
</ TD>
</ TR>
</ table>
</ body>
</ HTML>
****
/ / Función loadLargeView por Richard A. Hyman; www.rhyman.net
/ / Copyright © RAHyman, todos los derechos reservados.
/ / Para el uso, póngase en contacto con R. Hyman a través del correo electrónico "rick @ t rhyman.net"
VAR largeURL;
VAR theWinTitle;
VAR imageWidth;
var imageHeight;
VAR windowWidth;
VAR windowHeight;
imageRatio var = imageWidth / imageHeight;
scriptStr var = \ r window.onresize = resizeMyImage;;
loadedWin var = window.open (,, la ubicación = 0, altura = windowHeight + +, width = windowWidth + +, scrollbars = 0, tamaño = 1);
loadedWin.document. write (<html> <head> <title> theWinTitle + + </ title>);
loadedWin.document.write (\ r <script language=\"javascript1.2\">);
loadedWin.document.write (\ r resizeMyImage función () ();
loadedWin.document.write (\ r imageRatio var = + + imageRatio;);
loadedWin.document.write (\ r newWinWidth var = window.innerWidth; newWinHeight var = window.innerHeight; windowRatio var = newWinWidth / newWinHeight;);
loadedWin.document. write (\ r if (windowRatio> imageRatio) (document.main_image.height = newWinHeight; document.main_image.width = newWinHeight * imageRatio;) else (document.main_image.width = newWinWidth; document.main_image.height = newWinWidth / imageRatio) );
loadedWin.document.write (\ r));
loadedWin.document.write (scriptStr);
loadedWin.document.write (\ r </ script> </ head> <body topmargin=0 leftmargin=0 marginheight=0 marginwidth=0>);
loadedWin.document. write (<img src=+largeURL+ name=\"main_image\">);
loadedWin.document.write (</ body> </ html>);
loadedWinRatio var = windowWidth / windowHeight;
if (loadedWinRatio> imageRatio) (
loadedWin.document.main_image.height = windowHeight;
loadedWin.document.main_image.width = windowHeight * imageRatio;
) Else (
loadedWin.document.main_image.width = windowWidth;
loadedWin.document.main_image. altura = windowWidth / imageRatio;
)
/ / Fin de loadLargeView