<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>IE7下的图片预览功能</title>
</head>
<body>
<h1 id=d style="border:1px solid black;filter : progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=image);WIDTH: 300px; HEIGHT: 300px">
</h1>
<script>
d.filters.item("DXImageTransform.Microsoft.AlphaImageLoader").src = '../../images/caocao.jpg';
d.style.width = d.offsetWidth / 4;
d.style.height = d.offsetHeight / 4;
d.filters.item("DXImageTransform.Microsoft.AlphaImageLoader").sizingMethod = 'scale';
//ie6-上传图片校验
function UpImgInHtm()
{
if (document.getElementById("img1").fileSize == -1)
{
alert("文件类型不正确,请选择正确的图象文件上传!");
cHead = 0;
return false;
}
var s = document.getElementById("img1").fileSize / 1024;
if (s > 300)
{
alert("图象大小超过300K,请重新选择上传!");
cHead = 0;
return false;
}
var str = document.getElementById("fu1").value;
var obj = document.getElementById("LitImg");
obj.src = str;
cHead = 1;
return false;
}
</script>
</body>
</html>