filter在aspx网页中不能显示图片,在html文件中显示,为什么?
<body><scripttype="text/javascript"language="javascript"><!--functionPreviewImg(imgFi...
<body>
<script type="text/javascript" language="javascript">
<!--
function PreviewImg(imgFile) {
var newPreview = document.getElementById("newPreview");
var imgDiv = document.createElement("div");
document.body.appendChild(imgDiv);
imgDiv.style.width = "118px"; imgDiv.style.height = "127px";
imgDiv.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod = scale)";
imgDiv.filters.item("DXImageTransform.Microsoft.AlphaImageLoader").src = imgFile.value;
newPreview.appendChild(imgDiv);
newPreview.style.width = "205px";
newPreview.style.height = "219px";
}
-->
</script>
<body>
<div>
<input type="file" name="FileUpload1" id="FileUpload1" onchange="javascript:PreviewImg(this);" />
</div>
<div id="newPreview" style=" border: solid gray 1px; width:205px; height:219px;">
</div>
</body>
用vs运行的话能显示,可是IIS发布之后就不显示了 展开
<script type="text/javascript" language="javascript">
<!--
function PreviewImg(imgFile) {
var newPreview = document.getElementById("newPreview");
var imgDiv = document.createElement("div");
document.body.appendChild(imgDiv);
imgDiv.style.width = "118px"; imgDiv.style.height = "127px";
imgDiv.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod = scale)";
imgDiv.filters.item("DXImageTransform.Microsoft.AlphaImageLoader").src = imgFile.value;
newPreview.appendChild(imgDiv);
newPreview.style.width = "205px";
newPreview.style.height = "219px";
}
-->
</script>
<body>
<div>
<input type="file" name="FileUpload1" id="FileUpload1" onchange="javascript:PreviewImg(this);" />
</div>
<div id="newPreview" style=" border: solid gray 1px; width:205px; height:219px;">
</div>
</body>
用vs运行的话能显示,可是IIS发布之后就不显示了 展开
3个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询