Internet explorer 8 jcrop不在internet explorer 8上工作
我正在使用Jcrop在我的web应用程序中裁剪图像。它在除IE8之外的所有浏览器(IE9、FF、Chrome、Safari)上都能很好地工作。特别是Windows 7附带的8.7.6 我使用的是jcropv0.9.9 在Firefox中,我看到一个类似DOM的结构 img id。。。“style=”显示:无” div class=“jcrop支架” div 在IE 8.7.6中,我看到DOM是这样的 img id.“style=”显示:无” ----空白------- 基本上,jcrop持有者不会被注入DOM,而原始图像就像其他浏览器一样被隐藏 可以吗。能解释一下吗?如果你知道IE的解决方法 谢谢你的帮助 将jcrop附加到目标图像的Javascript代码Internet explorer 8 jcrop不在internet explorer 8上工作,internet-explorer-8,jcrop,Internet Explorer 8,Jcrop,我正在使用Jcrop在我的web应用程序中裁剪图像。它在除IE8之外的所有浏览器(IE9、FF、Chrome、Safari)上都能很好地工作。特别是Windows 7附带的8.7.6 我使用的是jcropv0.9.9 在Firefox中,我看到一个类似DOM的结构 img id。。。“style=”显示:无” div class=“jcrop支架” div 在IE 8.7.6中,我看到DOM是这样的 img id.“style=”显示:无” ----空白------- 基本上,jcrop持有者不
function attachJcropToModal()
{
jQuery(function($)
{
$('#jcrop_target').Jcrop(
{
aspectRatio: '<%=defaultAspectRatioValue%>',
minSize: [0,0],
onChange: updateCoords,
onSelect: updateCoords
},
function ()
{
jcrop_api = this;
}
);
});
}
function updateCoords(c)
{
$('#w').val(Math.round(c.w*adjFactor));
$('#h').val(Math.round(c.h*adjFactor));
$('#x1').val(Math.round(c.x*adjFactor));
$('#y1').val(Math.round(c.y*adjFactor));
}
函数attachJcropToModal()
{
jQuery(函数($)
{
$('jcrop_target')。jcrop(
{
aspectRatio:“”,
minSize:[0,0],
onChange:updateCoords,
onSelect:updateWord
},
函数()
{
jcrop_api=这个;
}
);
});
}
函数updateCoords(c)
{
$('#w').val(数学四舍五入(c.w*adjFactor));
$('#h').val(数学四舍五入(c.h*adjFactor));
$('#x1').val(数学四舍五入(c.x*adjFactor));
$('#y1').val(数学四舍五入(c.y*adjFactor));
}
Html图像显示代码
<div class="cropperContainer">
<table>
<tbody><tr>
<td class="main">
<img id="jcrop_target" src="<%=imgSourceURL%>"<%=overriddenImageWidthAttr%> alt="" />
</td>
</tr>
</tbody></table>
</div>
“alt=”“/>
您的代码看起来不错,只有一件事!您不应该在aspectRatio十进制值周围使用“”
Jcrop演示在IE8上工作,对吗
也许你应该试一试。我在一个商业项目中使用了它,经过一些调整后,它在IE7+、FF和Safari等方面对我们非常有用。关于你的html和脚本代码的更多信息将非常有用。Nikolaj,我刚刚添加了脚本和html
<div class="cropperContainer">
<table>
<tbody><tr>
<td class="main">
<img id="jcrop_target" src="<%=imgSourceURL%>"<%=overriddenImageWidthAttr%> alt="" />
</td>
</tr>
</tbody></table>
</div>