»
AnglaisFran�aisVietnamien

Imprimer - Popup Image - JavaScriptBank.com

Version compl�te: jsB@nk » Image » Visualiseur d'images » Popup Image
URL: https://www.javascriptbank.com/image-popup.html

Popup Image © JavaScriptBank.comIl s'agit d'une «dynamique» du sélecteur d'image qui permet à vos internautes de voir une image en la sélectionnant à partir d'une liste de sélection.

Version compl�te: jsB@nk » Image » Visualiseur d'images » Popup Image
URL: https://www.javascriptbank.com/image-popup.html



JavaScript
<SCRIPT language=JavaScript>  <!--   // Title:Image Popupfunction imgdisp(xImage){var xImg = new Image();xImg.src=xImage;var xWidth=xImg.width+140; xHeight=xImg.height+140;var popup=window.open("","","width="+xWidth+", height="+xHeight)popup.resizeTo(xWidth,xHeight);popup.moveTo((screen.width-xWidth)/2,(screen.height-xHeight)/2)d=popup.document;// these lines set the foreground & background color.d.bgcolor="#FFFFFF"d.fgcolor="#000000"d.write('<title>'+xImage+'</title>');d.write('<Body background="'+xImage+'"><center><form>');//this line sets the image as background// the image tag.d.write('<img name="img" src="" alt="" border=0 style="border:3px #000000 solid"><br><br>');d.write('<input type="button" value="Print" onClick="self.print()" style="color:background">')d.write('<input type="button" value="Close" onClick="self.close()" style="color:background">')d.write('</form></center>')// these lines displays the image.d.images["img"].src=xImaged.images["img"].title=xImage+'  '+xWidth+' x '+xHeightd.images["img"].alt=xImage+'  '+xWidth+' x '+xHeightd.close();}   //--></SCRIPT><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


HTML
<FORM name=homepage><SELECT style="FONT-SIZE: 9pt; WIDTH: 150px; COLOR: #af0000; FONT-FAMILY: helvetica; BACKGROUND-COLOR: #afffaf" onchange=imgdisp(options[selectedIndex].value) name=theimage> <OPTION value=x   selected>--- Select Image ---<OPTION   value=logojs.gif>JSBank<OPTION   value=pic191.jpg>Girl<OPTION   value=backgr13.jpg>Bicycle<OPTION   value=logojs.gif>JSBank<OPTION   value=pic191.jpg>Girl<OPTION   value=backgr13.jpg>Bicycle<OPTION   value=logojs.gif>JSBank<OPTION   value=backgr13.jpg>Bicycle<OPTION   value=x></OPTION></SELECT> <INPUT style="FILTER: blur(direction=135) alpha(opacity=90); COLOR: #a00000; BACKGROUND-COLOR: #cfffcf" onclick="location='view-source:'+location.href" type=button value=" View Source "> </FORM><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->