»
EnglishFrenchVietnamese

Print - Zoom Utility - JavaScriptBank.com

Full version: jsB@nk » Utility » Zoom Utility
URL: https://www.javascriptbank.com/zoom-utility.html

Zoom Utility © JavaScriptBank.comPut the code anywhere you like to be zoomed in <body> part. You can edit the content as normal html (i.e set links, fonts, colors...). This JavaScript works with both IE and NS browsers.

Full version: jsB@nk » Utility » Zoom Utility
URL: https://www.javascriptbank.com/zoom-utility.html



HTML
<P>Example:<BR><SCRIPT>   document.write('<input type="button" value="+" name="in" onclick="zoom(1)" style="width:25;heigth:20">')document.write('&nbsp;<input type="button" value="-" name="out" onclick="zoom(0)" style="width:25;heigth:20">')document.write('&nbsp;<input type="button" value="N" name="normalize" onclick="index=9;zoom(1)" style="width:25;heigth:20">')  document.write('&nbsp;&nbsp;<input type="text" value="100%" id="percent" size="5">')var commentsbegintag='<font face="Arial, Tahoma">'comments="if<br>"+"<i>you</i><br>"+"really want<br>"+"<b>to be lonely,</b><br>"+"<b><a href='http://www.cnn.com'>GET MARRIED</a>!</b>"var ie4=document.all&&!document.getElementByIdvar ns4=document.layersvar DOM2=document.getElementByIdif (ie4||DOM2) document.write('<div id="zoomer"></div>')else document.write('<ilayer id="zoomerns"><layer id="zoomerns_sub" left=0 top=0></layer></ilayer>')var index=10if (DOM2){document.getElementById("zoomer").style.fontSize=index*2+5+'px';document.getElementById("zoomer").innerHTML=begintag+comments+'</font>'}else if (ie4){document.all.zoomer.style.fontSize=index*2+5+'px';document.all.zoomer.innerHTML=begintag+comments+'</font>'}else if (ns4){document.zoomerns.document.zoomerns_sub.document.write('<font face="Impact" size="'+index+'">'+comments+'</font>')document.zoomerns.document.zoomerns_sub.document.close()}function zoom(how){if ((index<=50)&&(how==1)) index++if ((index>0)&&(how==0)) index--document.getElementById("percent").value=4*(index*2+5)+"%"if (DOM2){document.getElementById("zoomer").style.fontSize=index*2+5+'px';document.getElementById("zoomer").innerHTML=begintag+comments+'</font>'}else if (ie4){document.all.zoomer.style.fontSize=index*2+5+'px';document.all.zoomer.innerHTML=begintag+comments+'</font>'}else if (ns4){document.zoomerns.document.zoomerns_sub.document.write('<font face="Impact" size="'+index+'">'+comments+'</font>')document.zoomerns.document.zoomerns_sub.document.close()}}</SCRIPT><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->