jsの書いた方法はアップロードのピクチャーを実現した後で大きい図を見ます。


画像を調べたら、大図を見る機能が必要になりますので、jsで方法を書きました。イメージのonmouseoverイベントでこの方法を呼び出します。このようにして、マウスが図の上に浮遊している時に、大きな図が自動的に表示されます。大図と隠し大図のjsコードを表示します。
 
<script type="text/javascript">
//
function over(imgid,obj,imgbig)
{
// 4 3 400 300
maxwidth=400;
maxheight=300;

//
obj.style.display="";
imgbig.src=imgid.src;


//1、 , , , 2、3
//2、 ,
//3、 ,

if(img.width>maxwidth&&img.height>maxheight)
{
pare=(img.width-maxwidth)-(img.height-maxheight);
if(pare>=0)
img.width=maxwidth;
else
img.height=maxheight;
}
else if(img.width>maxwidth&&img.height<=maxheight)
{
img.width=maxwidth;
}
else if(img.width<=maxwidth&&img.height>maxheight)
{
img.height=maxheight;
}
}

//
function out()
{
document.getElementById('divImage').style.display="none";
}
</script>
は小図のイメージと大図のイメージを表示します。
 
<img id="img" src=" " onmouseover="over(img,divImage,imgbig);" onmouseout="out()" width="100" alt="" height="100" />

<%-- --%>
<div id="divImage" style="display: none; left: 120px;top:5px; position: absolute">
<img id="imgbig" src="~/Images/noImage.gif" alt=" " />
</div>