L?I: Internet Explorer d?ng p ?ng khi b?n t?i v? h?nh ?nh

D?ch tiu ? D?ch tiu ?
ID c?a bi: 269802
Bung t?t c? | Thu g?n t?t c?

TRI?U CH?NG

Khi b?n duy?t m?t trang Web nng ?ng thm h?nh ?nh ? m?t trang, m?t s? trong nh?ng h?nh ?nh khng lin t?c c th? khng xu?t hi?n. Internet Bi?u t?ng Explorer ti?p t?c quay cho nm pht ? gc trn bn ph?i cc tr?nh duy?t nh n?u cc tr?nh duy?t d?ng p ?ng (b? treo) trong khi n c? t?i v? n?i dung. Ban co th nhn c thng bao li sau y:
-2147012894 Internet Client l?i: yu c?u h?t th?i gian.

GI?I PHP

? gi?i quy?t v?n ? ny, b?n c th? s? d?ng m?t trong cc cch sau phng php:
  • Thi?t k? l?i cc ?ng d?ng Web ? gi?m thi?u nng ?ng b? sung cc h?nh ?nh vo trang.
  • Trong tr?ng h?p nh?t ?nh, ch?ng h?n nh v d? th? hi?n trong hn n?a" Thng tin"ph?n, b?n c th? recode cc ?ng d?ng Web ? t? ?ng chn cc <img> th? b?ng cch s? d?ng cc innerHTML b?t ?ng s?n m khng c ch? ?nh cc src b?t ?ng s?n.

    Sau ny, ch?ng h?n nh trn m?t b? ?m th?i gian t? ch?c s? ki?n, cc src thu?c tnh c th? ?c thay ?i nng ?ng ? ph?n nh ng URL c?a h?nh ?nh. Vi du:
    function doLoad()
    	{
    	// After changing the xsl to not include the src for the image tags
    	xslTarget.innerHTML = source.transformNode(style.XMLDocument);
    	window.setTimeout("addImg()",1);
    	
    	}
    	function addImg()
    	{
    		var imgs;
    		imgs = document.body.all.tags("IMG");
    		var srcs=source.selectNodes("//Path");
    		
    		var len=imgs.length;
    		for(i=0;i<len;i++)
    		{
    			imgs[i].src=srcs(i).text;
    		}
    	}
    					
  • Tng s? l?ng t?i a c?a k?t n?i cho m?i my ch?. bit thm thng tin, bm vao s bai vit sau xem bai vit trong C s Kin thc Microsoft:
    183110Thng tin: WinINet x? l? gi?i h?n k?t n?i m?i my ch?

    LU ?: K? thu?t ny lm tng t?i k?t n?i trn t?t c? cc my ch? HTTP Internet Explorer thm v trn ton c?u l l?c l?ng Internet Explorer i ng?c l?i ?c i?m k? thu?t HTTP. Workaround workaround ny ch? ?c ? ngh? n?u Internet Thm hi?m treo c?ng th?ng xuyn, v b?n khng th? thay ?i m? cho cc trang Web Trang web.

T?NH TR?NG

Microsoft ? xc nh?n r?ng y l m?t l?i trong Microsoft cc s?n ph?m ?c li?t k ? ?u c?a bi vi?t ny.

THNG TIN THM

Cc trang m tri?n l?m v?n ? ny khc nhau r?t nhi?u ? thi?t k? v k? thu?t. Tuy nhin, ? m?t m?c ? c b?n, t?t c? cc trang ?c bi?t tri?n l?m ny v?n ? c? th? thm h?nh ?nh t? ?ng sau khi ban ?u trang c hon t?t t?i. Cc trang ny ho?c l thay ?i cc src b?t ?ng s?n c?a m?t <img> t? kha ho?c t? ?ng thm <img> th? v?i cc innerHTML b?t ?ng s?n ho?c insertAdjacentHTML phng php.

V d? sau l m?t trang c b?n s? d?ng Extensible Markup Language (XML) v innerHTML ? minh h?a cc m? l d? b? l?i ny:
<HTML>
<BODY onload="doLoad()">
<SCRIPT language="JavaScript">
    function doLoad()
    {
        xslTarget.innerHTML = source.transformNode(style.XMLDocument);
    }
</SCRIPT>

<XML id="source">
<Data>

  <Image>
    <Name>Image 1</Name>
    <Path>SomeImage.gif</Path>
  </Image>
  <Image>
    <Name>Image 2</Name>
    <Path>SomeImage.gif</Path>
  </Image> 
  .........
  .........
  <Image>
    <Name>Image 50</Name>
    <Path>SomeImage.gif</Path>
  </Image> 
</Data>
</XML>
<XML id="style">
<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">
<xsl:template match="/">
    <xsl:apply-templates select="//Image"/>
</xsl:template>
<xsl:template match="Image">
   <P> Some Image
   <img border="0" width="16" height="16">
  	<xsl:attribute name="name"><xsl:value-of select="Name"/></xsl:attribute>
  	<xsl:attribute name="src"><xsl:value-of select="Path"/></xsl:attribute>	
   </img>
   </P>
</xsl:template>
</xsl:stylesheet>
</XML>   	

<DIV id="xslTarget"></DIV>

</BODY>
</HTML>
				
Tr?ng h?p th? nghi?m m?u ny l th? sanh s?n nhi?u v s? d?ng Extensible Stylesheet Ngn ng? (XSL) x? l? d? li?u XML trong th? XML. XSL bi?n ?i d? li?u XML ? hi?n th? n?i dung. Khi b?n thi?t l?p innerHTML trn xslTarget DIV Nhm nguyn t? trong s? ki?n onload c?a s? cho Trang ny, m?t h?nh ?nh l thm vo trang cho m?i nt "h?nh ?nh" trong d? li?u XML. Nh ?c m t? tr?c , i?u ny c th? ch?ng minh v?n ? m t? trong bi vi?t ny, ty thu?c vo s? th?i gian c?a cc ph?n c?a cc ?ng d?ng Web.

THAM KH?O

? bi?t thm chi ti?t v? pht tri?n gi?i php d?a trn Web cho Microsoft Internet Explorer, gh thm Web site sau c?a Microsoft:
http://MSDN.Microsoft.com/IE/

http://support.Microsoft.com/IEP

Thu?c tnh

ID c?a bi: 269802 - L?n xem xt sau cng: 22 Thang Tam 2011 - Xem xt l?i: 2.0
T? kha:
kbbug kbnavigation kbpending kbmt KB269802 KbMtvi
My d?ch
QUAN TRONG: Bi vi?t ny ?c d?ch b?ng ph?n m?m d?ch my c?a Microsoft ch? khng ph?i do con ng?i d?ch. Microsoft cung c?p cc bi vi?t do con ng?i d?ch v c? cc bi vi?t do my d?ch ? b?n c th? truy c?p vo t?t c? cc bi vi?t trong C s? Ki?n th?c c?a chng ti b?ng ngn ng? c?a b?n. Tuy nhin, bi vi?t do my d?ch khng ph?i lc no c?ng hon h?o. Lo?i bi vi?t ny c th? ch?a cc sai st v? t? v?ng, c php ho?c ng? php, gi?ng nh m?t ng?i n?c ngoi c th? m?c sai st khi ni ngn ng? c?a b?n. Microsoft khng ch?u trch nhi?m v? b?t k? s? thi?u chnh xc, sai st ho?c thi?t h?i no do vi?c d?ch sai n?i dung ho?c do ho?t ?ng s? d?ng c?a khch hng gy ra. Microsoft c?ng th?ng xuyn c?p nh?t ph?n m?m d?ch my ny.
Nh?p chu?t vo y ? xem b?n ti?ng Anh c?a bi vi?t ny:269802
Khc t Ni dung trong C s Kin thc Khng con c h tr
Bi vi?t ny ni v? cc s?n ph?m m Microsoft khng c?n h? tr? n?a. Do , bi vi?t ny ?c cung c?p "nguyn b?n" v s? khng ?c c?p nh?t.

Cung cp Phan hi

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com