Following simple code zoomin and zoom out (Image and content ) using JavaScript / HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> Zoom In / Zoom Out </TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
<script type="text/javascript">
function ZoomIn() {
var ZoomInValue = parseInt(document.getElementById("divContent").style.zoom) + 10 + '%'
document.getElementById("divContent").style.zoom = ZoomInValue;
return false;
}
function ZoomOut() {
var ZoomOutValue = parseInt(document.getElementById("divContent").style.zoom) - 10 + '%'
document.getElementById("divContent").style.zoom = ZoomOutValue;
return false;
}
function Zoomorg() {
var ZoomOutValue = parseInt(100) + '%'
document.getElementById("divContent").style.zoom = ZoomOutValue;
return false;
}
</script>
</HEAD>
<BODY>
<div>
<input type="button" value="Zoom In" OnClick="return ZoomIn();" />
<input type="button" value="Zoom out" OnClick="return ZoomOut();" />
<input type="button" value="Orignal Size" OnClick="return Zoomorg();" /> <br><br>
</div>
<div id="divContent" style="zoom: 100%">
Six month Professional Training in Web Desinging from Rajiv Nanda Design & Photography
HTML, Dream weaver CS3(CSS, Div Tag, Table less
Sites), Flash CS3 with Action script, Anfy Java ,
Flax, Front Page, VCD Cutter, Jquery, javascript,
Sound Forge, Xara 3D, Anim FX, Corel Draw,
Photoshop, Illustrator)
</div>
</BODY>
</HTML>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> Zoom In / Zoom Out </TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
<script type="text/javascript">
function ZoomIn() {
var ZoomInValue = parseInt(document.getElementById("divContent").style.zoom) + 10 + '%'
document.getElementById("divContent").style.zoom = ZoomInValue;
return false;
}
function ZoomOut() {
var ZoomOutValue = parseInt(document.getElementById("divContent").style.zoom) - 10 + '%'
document.getElementById("divContent").style.zoom = ZoomOutValue;
return false;
}
function Zoomorg() {
var ZoomOutValue = parseInt(100) + '%'
document.getElementById("divContent").style.zoom = ZoomOutValue;
return false;
}
</script>
</HEAD>
<BODY>
<div>
<input type="button" value="Zoom In" OnClick="return ZoomIn();" />
<input type="button" value="Zoom out" OnClick="return ZoomOut();" />
<input type="button" value="Orignal Size" OnClick="return Zoomorg();" /> <br><br>
</div>
<div id="divContent" style="zoom: 100%">
Six month Professional Training in Web Desinging from Rajiv Nanda Design & Photography
HTML, Dream weaver CS3(CSS, Div Tag, Table less
Sites), Flash CS3 with Action script, Anfy Java ,
Flax, Front Page, VCD Cutter, Jquery, javascript,
Sound Forge, Xara 3D, Anim FX, Corel Draw,
Photoshop, Illustrator)
</div>
</BODY>
</HTML>
No comments:
Post a Comment