Due to security issues, IE7 disabled the image control to reference local images. After several days of being depressed for this problem, I finally found a solution. I want to share some good things with you, Code As follows:
This code segment is placed between < Style Type = " Text/CSS " > # Newpreview {
Filter: progid: DXImageTransform. Microsoft. alphaimageloader (sizingmethod=Scale)
}
</ Style >
Code in <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 >