Header Ads

watermark image using javascript mouse move event


< html xmlns="http://www.w3.org/1999/xhtml" >
< head runat="server" >
< title >Untitled Page< /title >
< script >
function Selimg()
{
var imgid=document.getElementById("DrpImg").value;
if (imgid==1)document.getElementById("Imgfr").src="Fr-images/Apple.jpg";
if (imgid==2)document.getElementById("Imgfr").src="Fr-images/banana.jpg";
if (imgid==3)document.getElementById("Imgfr").src="Fr-images/cherry.jpg";
if (imgid==4)document.getElementById("Imgfr").src="Fr-images/grapes.jpg";
if (imgid==5)document.getElementById("Imgfr").src="Fr-images/mango.jpg";
if (imgid==6)document.getElementById("Imgfr").src="Fr-images/orange.jpg";
if (imgid==7)document.getElementById("Imgfr").src="Fr-images/watermelon.jpg";
}
function Mmove()
{
document.getElementById("Imgfr").style.width='735px';
document.getElementById("Imgfr").style.height='540px';
}
< /script >
< /head >
< body >
< form id="form1" runat="server" >
< asp:DropDownList ID="DrpImg" runat ="Server" onchange="Selimg();" >
< asp:ListItem Text ="Apple" Value ="1" >< /asp:ListItem >
< asp:ListItem Text ="banana" Value ="2" >< /asp:ListItem >
< asp:ListItem Text ="cherry" Value ="3" >< /asp:ListItem >
< asp:ListItem Text ="grapes" Value ="4" >< /asp:ListItem >
< asp:ListItem Text ="mango" Value ="5" >< /asp:ListItem >
< asp:ListItem Text ="orange" Value ="6" >< /asp:ListItem >
< asp:ListItem Text ="watermelon" Value ="7" >< /asp:ListItem >
< /asp:DropDownList >
< img src="Fr-images/Apple.jpg" id="Imgfr" runat ="Server" onmousemove ="Mmove()" / >

< /form >
< /body >
< /html >

No comments:



Powered by Blogger.