惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

爱范儿
爱范儿
博客园_首页
W
WeLiveSecurity
S
Secure Thoughts
S
Security @ Cisco Blogs
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Hugging Face - Blog
Hugging Face - Blog
www.infosecurity-magazine.com
www.infosecurity-magazine.com
H
Hacker News: Front Page
Project Zero
Project Zero
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
U
Unit 42
N
News and Events Feed by Topic
N
News and Events Feed by Topic
Hacker News - Newest:
Hacker News - Newest: "LLM"
Forbes - Security
Forbes - Security
T
Tor Project blog
I
Intezer
B
Blog
F
Full Disclosure
Security Archives - TechRepublic
Security Archives - TechRepublic
F
Fortinet All Blogs
Schneier on Security
Schneier on Security
T
Threat Research - Cisco Blogs
AI
AI
Google DeepMind News
Google DeepMind News
L
LINUX DO - 最新话题
Cloudbric
Cloudbric
L
Lohrmann on Cybersecurity
WordPress大学
WordPress大学
博客园 - 聂微东
雷峰网
雷峰网
P
Privacy International News Feed
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
PCI Perspectives
PCI Perspectives
Y
Y Combinator Blog
Spread Privacy
Spread Privacy
Simon Willison's Weblog
Simon Willison's Weblog
罗磊的独立博客
Vercel News
Vercel News
A
Arctic Wolf
The Register - Security
The Register - Security
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Microsoft Azure Blog
Microsoft Azure Blog
H
Heimdal Security Blog
Know Your Adversary
Know Your Adversary
P
Proofpoint News Feed
C
Cybersecurity and Infrastructure Security Agency CISA
P
Proofpoint News Feed

博客园 - Cheek G

JQuery常用方法一览 6 bytes !! IE判定 项目小记: IFRAME引起内存泄露的解决方法 - Cheek G wcf中使用Session 整人小程序【转自CSDN】 WF学习日记(一) Asp.net MVC框架学习【收藏】 Web Services 学习【收藏】 输出CSV文件并直接打开时出现SYLK异常 JS 其他(二) - Cheek G JS 其他 - Cheek G JS验证类(一) 非常NB的sql2005分页 web页局部打印 - Cheek G - 博客园 DIV背景半透明,DIV中的字不半透明 - Cheek G - 博客园 js等比例缩放图片 - Cheek G - 博客园 IIS 7 中默认页设置的小问题 文件的ContentType类型 小全 页面加载完成前显示LOADING....
asp.net在ie7中使用FileUpload上传前预览图片 - Cheek G - 博客园
Cheek G · 2008-10-12 · via 博客园 - Cheek G

因为安全性问题,IE7禁用了image控件引用本地图片,为了这个问题郁闷了好几天,终于找到了解决方案,好东西要与大家分享,代码如下:

此段代码放于<head> ....</head>之间

<style type="text/css">
#newPreview { FILTER: progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=scale)}
</style>  

<body>内的代码

<script language="javascript" type="text/javascript">
   function PreviewImg(imgFile)
{    
    var newPreview 
= document.getElementById("newPreview");
    newPreview.filters.item(
"DXImageTransform.Microsoft.AlphaImageLoader").src = imgFile.value;
    newPreview.style.width 
= "80px";
    newPreview.style.height 
= "60px";
}

</script>        
<asp:FileUpload ID="Fud_Pic" runat="server" onchange="PreviewImg(this)" />
<div id="newPreview"></div>