62,025
社区成员
发帖
与我相关
我的任务
分享
<img id="image2" alt="" style="width:200px; height:200px; cursor: hand;" onclick="javascript:openwindow('7ffdbeb3b51a4c659434d59a4fd994f4')"
onload="javascript:DrawImage(this,200px,200px);" title="点击看大图" src="Admin/CompanyInfoPic_Show.aspx?CompanyCode=7ffdbeb3b51a4c659434d59a4fd994f4" />
<script type="text/javascript">
function openwindow(src)
{
window.alert(src);
var width=540;
var height=420;
window.alert("./Admin/CompanyInfoPic_Show.aspx?CompanyCode="+src,"winhik","toolbar=no,width="+width+",height="+height+",top="+(screen.availheight-height)/2+",left="+(screen.availwidth-width)/2+",resizable=yes,scrollbars=yes");
var newin=window.open("./Admin/CompanyInfoPic_Show.aspx?CompanyCode="+src,"winhik","toolbar=no,width="+width+",height="+height+",top="+(screen.availheight-height)/2+",left="+(screen.availwidth-width)/2+",resizable=yes,scrollbars=yes");
newin.focus();
return newin;
}
function openwin(src)
{
var newin= window.open(src);
newin.focus();
return(newin);
}
function DrawImage(ImgD,FitWidth,FitHeight)
{
var image=new Image();
image.src=ImgD.src;
if(image.width>0 && image.height>0)
{
if(image.width/image.height>= FitWidth/FitHeight)
{
if(image.width>FitWidth)
{
ImgD.width=FitWidth;
ImgD.height=(image.height*FitWidth)/image.width;
}
else
{
ImgD.width=image.width;
ImgD.height=image.height;
}
}
else
{
if(image.height>FitHeight)
{
ImgD.height=FitHeight;
ImgD.width=(image.width*FitHeight)/image.height;
}
else
{
ImgD.width=image.width;
ImgD.height=image.height;
}
}
}
}
</script>
求高人解决 我相信csdn高手还是多的,
<img id="image2" alt="" style="width:200px; height:200px; cursor: hand;" onclick="javascript:openwindow('15d3f97dea63498b9154e7009b9de7aa')"