我在mypage.aspx中有一个标签:
<asp:Image ID="imgDedoPid" runat="server" Height="100%" data-big=""
ImageAlign="AbsBottom" />
在mypage.aspx.cs上我有这个电话:
Image imgDedoPid.ImageUrl = "Handler1.ashx?file=" + pathImgLoad
imgDedoPid.Attributes["data-big"] = imgDedoPid.ImageUrl;
imgDedoPid.Attributes.Add("onload", "lupa();");
和js页面是这样的:
<script type="text/javascript">
function lupa() {
$("#imgDedoPid").mlens(
{
imgSrc: $("#imgDedoPid").attr("data-big"), // path of the hi-res version of the image
lensShape: "circle", // shape of the lens (circle or square)
lensSize: 180, // size of the lens (in px)
borderSize: 4, // size of the lens border (in px)
borderColor: "#fff", // color of the lens border (#hex)
borderRadius: 0 // border radius (optional, only if the shape is square)
});
</script>
此代码在Google Chrome中完美运行,但在IE9中无效(图片已加载自动缩放,但我希望此效果:http://mlens.musings.it/)
任何人都可以帮助我吗?
谢谢!