C# asp:IE中的图像错误加载
我在mypage.aspx中有一个标记:C# asp:IE中的图像错误加载,c#,javascript,jquery,asp.net,C#,Javascript,Jquery,Asp.net,我在mypage.aspx中有一个标记: <asp:Image ID="imgDedoPid" runat="server" Height="100%" data-big="" ImageAlign="AbsBottom" /> js页面是这样的: <script type="text/javascript"> function lupa() {
<asp:Image ID="imgDedoPid" runat="server" Height="100%" data-big=""
ImageAlign="AbsBottom" />
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>
函数lupa(){
美元(“#imgDedoPid”).mlens(
{
imgSrc:$(“#imgDedoPid”).attr(“数据大”),//图像的高分辨率版本的路径
透镜形状:“圆”//透镜的形状(圆或正方形)
lensSize:180,//镜头大小(以像素为单位)
borderSize:4,//镜头边框的大小(以像素为单位)
borderColor:“#fff”,//镜头边框的颜色(#hex)
borderRadius:0//边界半径(可选,仅当形状为方形时)
});
这段代码在GoogleChrome中运行得很好,但在IE9中不起作用(图像已经加载到自动缩放中,但我想要这个效果:)
有人能帮我吗
谢谢!这是IE缓存不触发onload问题吗?您甚至需要从映像调用它吗?您可以按照他们的示例,让jquery处理它吗?$(document).ready(function(){$(“#imgDedoPid”).mlens(..…Javascript语法出现错误。您使用一个大括号打开函数定义,但不关闭大括号。这只是将JS输入StackOverflow的问题吗?
<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>