在 IE 8 中显示 EMF 文件

发布于 2024-09-28 14:47:59 字数 3856 浏览 0 评论 0原文

我想在 IE 8 中显示一些(大约 5 到 10 个)EMF(增强型图元文件)文件。 我使用 ASP 从定义的文件夹中获取所有文件,并使用 标签显示它们。 有些图像非常大,因此尝试通过将其高度设置为 100 来减小尺寸。

这是正确的方法吗?图像加载速度非常慢,并且并非所有图像都加载。当我删除高度属性时,将加载图像。

你能帮我做对吗?

这是来源:

<HTML>
<BODY>
<FORM NAME="alphabetSelection" method="get" action="new2.asp" target="home">
<TABLE width="100%">
<TR>
<TD width="4.1667%"><A href="new2.asp?clickedLink=a">A</A></TD>
<TD width="4.1667%"><A href="new2.asp?clickedLink=b">B</TD>
<TD width="4.1667%"><A href="new2.asp?clickedLink=c">C</TD>
<TD width="4.1667%"><A href="new2.asp?clickedLink=d">D</TD>
<TD width="4.1667%"><A href="new2.asp?clickedLink=e">E</TD>
<TD width="4.1667%"><A href="new2.asp?clickedLink=f">F</TD>
<TD width="4.1667%"><A href="new2.asp?clickedLink=g">G</TD>
<TD width="4.1667%"><A href="new2.asp?clickedLink=h">H</TD>
<TD width="4.1667%"><A href="new2.asp?clickedLink=i">I</TD>
<TD width="4.1667%"><A href="new2.asp?clickedLink=j">J</TD>
<TD width="4.1667%"><A href="new2.asp?clickedLink=k">K</TD>
<TD width="4.1667%"><A href="new2.asp?clickedLink=l">L</TD>
<TD width="4.1667%"><A href="new2.asp?clickedLink=m">M</TD>
<TD width="4.1667%"><A href="new2.asp?clickedLink=n">N</TD>
<TD width="4.1667%"><A href="new2.asp?clickedLink=o">O</TD>
<TD width="4.1667%"><A href="new2.asp?clickedLink=p">P</TD>
<TD width="4.1667%"><A href="new2.asp?clickedLink=q">Q</TD>
<TD width="4.1667%"><A href="new2.asp?clickedLink=r">R</TD>
<TD width="4.1667%"><A href="new2.asp?clickedLink=s">S</TD>
<TD width="4.1667%"><A href="new2.asp?clickedLink=t">T</TD>
<TD width="4.1667%"><A href="new2.asp?clickedLink=u">U</TD>
<TD width="4.1667%"><A href="new2.asp?clickedLink=v">V</TD>
<TD width="4.1667%"><A href="new2.asp?clickedLink=w">W</TD>
<TD width="4.1667%"><A href="new2.asp?clickedLink=x">X</TD>
<TD width="4.1667%"><A href="new2.asp?clickedLink=y">Y</TD>
<TD width="4.1667%"><A href="new2.asp?clickedLink=z">Z</TD>
</TR>
</TABLE>
</FORM>
<TABLE width="100%">
<TR>
<TD>Name</TD>
<TD>Bild</TD>
</TR>

<%
var todo=Request.QueryString("clickedLink");
if(Request.QueryString == "")
{
    todo = "a";
}
ShowFilesWithLetter(todo);


function ShowFilesWithLetter(theBeginningLetter) 
{  
    var folder = 'C:\\Force ASP\\FormularImages'; 

    var fso = new ActiveXObject('Scripting.FileSystemObject'); 
    var fold = fso.GetFolder(folder);
    var foundValues = false;
    for (files = new Enumerator(fold.files); !files.atEnd(); files.moveNext()) 
    { 
        Response.Write("<TR>");
        var thisFile = files.item(); 
        thisFile=thisFile.name.toLowerCase();
        if( thisFile.charAt(0) == theBeginningLetter )
        {
            Response.Write("<TD  >" + thisFile + "</TD>");
            Response.Write("<TD ><IMG height=\"100\" SRC=\"../FormularImages/" + thisFile + "\"  /></TD>\n");
            Response.Write("</TR>");    
            foundValues = true;
        }
    } 

    if(!foundValues)
    {
        var theLetter = new String(theBeginningLetter);
        theLetter = theLetter.toUpperCase();
        Response.Write("<TD COLSPAN=\"2\"><CENTER>No Images beginning with the Letter: " + theLetter  + " </CENTER></TD>");
    }
}
%>

</TABLE>
</BODY>
</HTML>

i would like to show some (about 5 to 10) EMF (Enhanced Metafile) Files in the IE 8.
I use ASP to get all Files from a defined Folder and show them with the <img src=""> Tag.
Some of the IMages are really big, so tried to reduce the size by setting its height to 100.

Is this the correct way? The Images load very slow and not all images are loaded. When i remove the height Attribute the Image is loaded.

Can you help me, do it right?

This is the Source:

<HTML>
<BODY>
<FORM NAME="alphabetSelection" method="get" action="new2.asp" target="home">
<TABLE width="100%">
<TR>
<TD width="4.1667%"><A href="new2.asp?clickedLink=a">A</A></TD>
<TD width="4.1667%"><A href="new2.asp?clickedLink=b">B</TD>
<TD width="4.1667%"><A href="new2.asp?clickedLink=c">C</TD>
<TD width="4.1667%"><A href="new2.asp?clickedLink=d">D</TD>
<TD width="4.1667%"><A href="new2.asp?clickedLink=e">E</TD>
<TD width="4.1667%"><A href="new2.asp?clickedLink=f">F</TD>
<TD width="4.1667%"><A href="new2.asp?clickedLink=g">G</TD>
<TD width="4.1667%"><A href="new2.asp?clickedLink=h">H</TD>
<TD width="4.1667%"><A href="new2.asp?clickedLink=i">I</TD>
<TD width="4.1667%"><A href="new2.asp?clickedLink=j">J</TD>
<TD width="4.1667%"><A href="new2.asp?clickedLink=k">K</TD>
<TD width="4.1667%"><A href="new2.asp?clickedLink=l">L</TD>
<TD width="4.1667%"><A href="new2.asp?clickedLink=m">M</TD>
<TD width="4.1667%"><A href="new2.asp?clickedLink=n">N</TD>
<TD width="4.1667%"><A href="new2.asp?clickedLink=o">O</TD>
<TD width="4.1667%"><A href="new2.asp?clickedLink=p">P</TD>
<TD width="4.1667%"><A href="new2.asp?clickedLink=q">Q</TD>
<TD width="4.1667%"><A href="new2.asp?clickedLink=r">R</TD>
<TD width="4.1667%"><A href="new2.asp?clickedLink=s">S</TD>
<TD width="4.1667%"><A href="new2.asp?clickedLink=t">T</TD>
<TD width="4.1667%"><A href="new2.asp?clickedLink=u">U</TD>
<TD width="4.1667%"><A href="new2.asp?clickedLink=v">V</TD>
<TD width="4.1667%"><A href="new2.asp?clickedLink=w">W</TD>
<TD width="4.1667%"><A href="new2.asp?clickedLink=x">X</TD>
<TD width="4.1667%"><A href="new2.asp?clickedLink=y">Y</TD>
<TD width="4.1667%"><A href="new2.asp?clickedLink=z">Z</TD>
</TR>
</TABLE>
</FORM>
<TABLE width="100%">
<TR>
<TD>Name</TD>
<TD>Bild</TD>
</TR>

<%
var todo=Request.QueryString("clickedLink");
if(Request.QueryString == "")
{
    todo = "a";
}
ShowFilesWithLetter(todo);


function ShowFilesWithLetter(theBeginningLetter) 
{  
    var folder = 'C:\\Force ASP\\FormularImages'; 

    var fso = new ActiveXObject('Scripting.FileSystemObject'); 
    var fold = fso.GetFolder(folder);
    var foundValues = false;
    for (files = new Enumerator(fold.files); !files.atEnd(); files.moveNext()) 
    { 
        Response.Write("<TR>");
        var thisFile = files.item(); 
        thisFile=thisFile.name.toLowerCase();
        if( thisFile.charAt(0) == theBeginningLetter )
        {
            Response.Write("<TD  >" + thisFile + "</TD>");
            Response.Write("<TD ><IMG height=\"100\" SRC=\"../FormularImages/" + thisFile + "\"  /></TD>\n");
            Response.Write("</TR>");    
            foundValues = true;
        }
    } 

    if(!foundValues)
    {
        var theLetter = new String(theBeginningLetter);
        theLetter = theLetter.toUpperCase();
        Response.Write("<TD COLSPAN=\"2\"><CENTER>No Images beginning with the Letter: " + theLetter  + " </CENTER></TD>");
    }
}
%>

</TABLE>
</BODY>
</HTML>

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

橪书 2024-10-05 14:47:59

我不认为您可以在 HTML 中做太多事情来改变图像加载的速度。如果它们是大文件,则速度会很慢。

您可以尝试在 ASP 代码中创建较小版本的图像。我对ASP不熟悉,所以不知道有哪些图像处理功能。

I don’t think there’s much you can do in the HTML to change the speed at which the images are loaded. If they’re big files, they’re going to be slow.

You could maybe try to create smaller versions of the images in your ASP code. I’m not familiar with ASP, so I don’t know what image manipulation capabilities are available.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文