0

我在这里不知所措...

我触发了一个 Ajax 请求,它返回一个 HTML 响应,我想将它附加到一个名为$('.resultsBox').

在我测试的所有浏览器上,这都没有问题。只有 IE8 不这样做,我不知道为什么。

我的代码很简单:

alert(html_response);     // HTML snippet
alert($('.resultsBox').length);  // 1
$('.resultsBox').append( html_response );

问题:知道为什么这在 IE8 中不起作用吗?

谢谢!

编辑:所以响应非常大:-)

整理:

http://jsfiddle.net/userdude/JwZsh/

 <div class="container shrink searchResults singleResult"> <form action="fh_suche.cfm" method="post"  name="basket"> <input type="hidden" name="form_submitted" value="add_to_basket"> <input type="hidden" name="in_den_warenkorb" value="ja"> <input type="hidden" name="sortierung" value="a.artikelnummer"> <input type="hidden" name="sortierung2" value="DESC"> <input type="hidden" name="s_artikelbezeichnung" value=""> <input type="hidden" name="s_firma" value="KG"> <input type="hidden" name="s_marke" value="^"> <input type="hidden" name="s_artikelnummer" value="1-9_86278"> <input type="hidden" name="s_groesse" value=""> <input type="hidden" name="s_preis_v" value="4.4"> <input type="hidden" name="s_preis_b" value="4.4"> <input type="hidden" name="s_farbe" value=""> <input type="hidden" name="anzahl_eintraege" value="24"> <input type="hidden" name="startzeile" value="1"> <input type="hidden" name="iln_artikel" value="9900000004620"> <input type="hidden" name="order_art" value="nein"> <input type="hidden" name="loaded" value="nein"> <div class="row"> <div class="span3 aC"> <div><img src="http://s3.amazonaws.com/i.stokkers.mobi/9900000004620/m_1717265_0.jpg" alt="1-9_86278, Größen: " title="Soft-BH gen." class="adaptImg ui-corner-all" /></div> </div> <div class="span5"> <div class="ui-btn-up-c ui-corner-all ui-field-contain ui-body ui-br" data-role="fieldcontain"> <ul class="styleInfoBox ui-listview ui-listview-inset ui-corner-all ui-shadow" data-inset="true" data-role="listview"> <li class="ui-li ui-li-static ui-btn-up-c ui-corner-top"> <span class="ui-fake-label">Artikel</span> <span class="ui-fake-input">1-9_86278</span> </li> <li class="ui-li ui-li-static ui-btn-up-c ui-corner-bottom"> <span class="ui-fake-label">Info</span> <span class="ui-fake-input">Soft-BH gen.</span> </li> </ul> </div> </div> <div class="span4 span2xl"> <div class="ui-btn-up-c ui-corner-all ui-field-contain ui-body ui-br" data-role="fieldcontain"> <ul class="styleInfoBox ui-listview ui-listview-inset ui-corner-all ui-shadow" data-inset="true" data-role="listview"> <li class="ui-li ui-li-static ui-btn-up-c ui-corner-top"><span class="ui-fake-label">Preise</span></li> <li class="ui-li ui-li-static ui-btn-up-c"><span class="ui-fake-label">Einkauf</span><span class="ui-fake-input">1.00 EUR</span></li> <li class="ui-li ui-li-static ui-btn-up-c"><span class="ui-fake-label ui-highlight">Aktuell</span><span class="ui-fake-input ui-highlight">4.40 EUR</span></li> <li class="ui-li ui-li-static ui-btn-up-c"><span class="ui-fake-label">Rabatt</span><span class="ui-fake-input">340.00%</span></li> <li class="ui-li ui-li-static ui-btn-up-c ui-corner-bottom ui-li-last"><span class="ui-fake-label">Empf. Vk</span><span class="ui-fake-input">4.40 EUR</span></li> </ul> </div> </div> </div> <div class="row"> <div class="span12 detailBox"> <div class="collDisplay ui-collapsible-set ui-collapsible-set-horizontal ui-grid-a" data-create="false" data-content-theme="c" data-theme="c" data-type="horizontal" data-role="collapsible-set"> <div data-theme="c" data-icon="order" class="ui-nopad ui-collapsible ui-collapsible-inset ui-block-a" data-collapsed="false" data-role="collapsible"> <h3 class="ui-collapsible-heading"> <a class="ui-collapsible-heading-toggle ui-btn ui-btn-icon-left ui-corner-tl ui-btn-up-c" href="#"> <span class="ui-btn-inner ui-corner-tl"> <span class="ui-btn-text">Ordern
<span class="ui-collapsible-heading-status">Anklicken um Inhalte anzuzeigen</span> </span> </span> </a> </h3> <div class="ui-collapsible-content ui-body-c ui-corner-bottom" aria-hidden="false"> <div class="orderBox sizeBlock ui-box-inner overthrow noscroll"> <ul class="sizeChart"> <li class="sizeRow sizeHead"> <span class="sizeHeader">Farben/Größen</span> <span class="sizeButton">80B</span> <span class="sizeButton">85B</span> <span class="sizeButton">90B</span> <span class="sizeButton">95B</span> <span class="sizeButton">100B</span> <span class="sizeButton">80C</span> <span class="sizeButton">85C</span> <span class="sizeButton">90C</span> <span class="sizeButton">95C</span> <span class="sizeButton">100C</span> </li> <li class="sizeRow sizeEntry"> <div class="colorWrapper"><span class="pT elip">Weiss (300)</span></div> <div class="entry "> <label class="ui-hidden-accessible" for="qty1">80B</label> <input type="hidden" value="4005333621058" name="ean1"> <div data-corners="true" data-shadow="true" data-iconshadow="true" data-wrapperels="span" data-icon="" data-iconpos="" data-theme="c" data-inline="true" class="ui-btn ui-shadow ui-btn-corner-all ui-btn-inline ui-btn-up-c" aria-disabled="false"> <span class="ui-btn-inner ui-btn-corner-all "> <span class="ui-btn-text">>25</span> </span> <input type="button"
 class="qtyInput ui-btn-hidden" data-create="false" value=">25" data-inline="true" data-remember=">25" data-flag="false" id="qty1" aria-disabled="false"> </div> <input type="hidden" value="" id="mengenfeld1" name="menge1"> </div> <div class="entry "> <label class="ui-hidden-accessible" for="qty2">85B</label> <input type="hidden" value="4005333621065" name="ean2"> <div data-corners="true" data-shadow="true" data-iconshadow="true" data-wrapperels="span" data-icon="" data-iconpos="" data-theme="c" data-inline="true" class="ui-btn ui-shadow ui-btn-corner-all ui-btn-inline ui-btn-up-c" aria-disabled="false"> <span class="ui-btn-inner ui-btn-corner-all "> <span class="ui-btn-text">>25</span> </span> <input type="button"
class="qtyInput ui-btn-hidden" data-create="false" value=">25" data-inline="true" data-remember=">25" data-flag="false" id="qty2" aria-disabled="false"> </div> <input type="hidden" value="" id="mengenfeld2" name="menge2"> </div> <div class="entry "> <label class="ui-hidden-accessible" for="qty3">90B</label> <input type="hidden" value="4005333621072" name="ean3"> <div data-corners="true" data-shadow="true" data-iconshadow="true" data-wrapperels="span" data-icon="" data-iconpos="" data-theme="c" data-inline="true" class="ui-btn ui-shadow ui-btn-corner-all ui-btn-inline ui-btn-up-c" aria-disabled="false"> <span class="ui-btn-inner ui-btn-corner-all "> <span class="ui-btn-text">>25</span> </span> <input type="button"
 class="qtyInput ui-btn-hidden" data-create="false" value=">25" data-inline="true" data-remember=">25" data-flag="false" id="qty3" aria-disabled="false"> </div> <input type="hidden" value="" id="mengenfeld3" name="menge3"> </div> <div class="entry "> <label class="ui-hidden-accessible" for="qty4">95B</label> <input type="hidden" value="4005333621089" name="ean4"> <div data-corners="true" data-shadow="true" data-iconshadow="true" data-wrapperels="span" data-icon="" data-iconpos="" data-theme="c" data-inline="true" class="ui-btn ui-shadow ui-btn-corner-all ui-btn-inline ui-btn-up-c" aria-disabled="false"> <span class="ui-btn-inner ui-btn-corner-all "> <span class="ui-btn-text">>25</span> </span> <input type="button"
 class="qtyInput ui-btn-hidden" data-create="false" value=">25" data-inline="true" data-remember=">25" data-flag="false" id="qty4" aria-disabled="false"> </div> <input type="hidden" value="" id="mengenfeld4" name="menge4"> </div> <div class="entry "> <label class="ui-hidden-accessible" for="qty5">100B</label> <input type="hidden" value="4005333621096" name="ean5"> <div data-corners="true" data-shadow="true" data-iconshadow="true" data-wrapperels="span" data-icon="" data-iconpos="" data-theme="c" data-inline="true" class="ui-btn ui-shadow ui-btn-corner-all ui-btn-inline ui-btn-up-c" aria-disabled="false"> <span class="ui-btn-inner ui-btn-corner-all "> <span class="ui-btn-text">>25</span> </span> <input type="button"
 class="qtyInput ui-btn-hidden" data-create="false" value=">25" data-inline="true" data-remember=">25"  data-flag="false" id="qty5" aria-disabled="false"> </div> <input type="hidden" value="" id="mengenfeld5" name="menge5"> </div> <div class="entry "> <label class="ui-hidden-accessible" for="qty6">80C</label> <input type="hidden" value="4005333621119" name="ean6"> <div data-corners="true" data-shadow="true" data-iconshadow="true" data-wrapperels="span" data-icon="" data-iconpos="" data-theme="c" data-inline="true" class="ui-btn ui-shadow ui-btn-corner-all ui-btn-inline ui-btn-up-c" aria-disabled="false"> <span class="ui-btn-inner ui-btn-corner-all "> <span class="ui-btn-text">>25</span> </span> <input type="button"
 class="qtyInput ui-btn-hidden" data-create="false" value=">25" data-inline="true" data-remember=">25" data-flag="false" id="qty6" aria-disabled="false"> </div> <input type="hidden" value="" id="mengenfeld6" name="menge6"> </div> <div class="entry "> <label class="ui-hidden-accessible" for="qty7">85C</label> <input type="hidden" value="4005333621126" name="ean7"> <div data-corners="true" data-shadow="true" data-iconshadow="true" data-wrapperels="span" data-icon="" data-iconpos="" data-theme="c" data-inline="true" class="ui-btn ui-shadow ui-btn-corner-all ui-btn-inline ui-btn-up-c" aria-disabled="false"> <span class="ui-btn-inner ui-btn-corner-all "> <span class="ui-btn-text">>25</span> </span> <input type="button"
 class="qtyInput ui-btn-hidden" data-create="false" value=">25" data-inline="true" data-remember=">25" data-flag="false" id="qty7" aria-disabled="false"> </div> <input type="hidden" value="" id="mengenfeld7" name="menge7"> </div> <div class="entry "> <label class="ui-hidden-accessible" for="qty8">90C</label> <input type="hidden" value="4005333621133" name="ean8"> <div data-corners="true" data-shadow="true" data-iconshadow="true" data-wrapperels="span" data-icon="" data-iconpos="" data-theme="c" data-inline="true" class="ui-btn ui-shadow ui-btn-corner-all ui-btn-inline ui-btn-up-c" aria-disabled="false"> <span class="ui-btn-inner ui-btn-corner-all "> <span class="ui-btn-text">>25</span> </span> <input type="button"
 class="qtyInput ui-btn-hidden" data-create="false" value=">25" data-inline="true" data-remember=">25" data-flag="false" id="qty8" aria-disabled="false"> </div> <input type="hidden" value="" id="mengenfeld8" name="menge8"> </div> <div class="entry "> <label class="ui-hidden-accessible" for="qty9">95C</label> <input type="hidden" value="4005333621140" name="ean9"> <div data-corners="true" data-shadow="true" data-iconshadow="true" data-wrapperels="span" data-icon="" data-iconpos="" data-theme="c" data-inline="true" class="ui-btn ui-shadow ui-btn-corner-all ui-btn-inline ui-btn-up-c" aria-disabled="false"> <span class="ui-btn-inner ui-btn-corner-all "> <span class="ui-btn-text">>25</span> </span> <input type="button"
  class="qtyInput ui-btn-hidden" data-create="false" value=">25" data-inline="true" data-remember=">25" data-flag="false" id="qty9" aria-disabled="false"> </div> <input type="hidden" value="" id="mengenfeld9" name="menge9"> </div> <div class="entry "> <label class="ui-hidden-accessible" for="qty10">100C</label> <input type="hidden" value="4005333621157" name="ean10"> <div data-corners="true" data-shadow="true" data-iconshadow="true" data-wrapperels="span" data-icon="" data-iconpos="" data-theme="c" data-inline="true" class="ui-btn ui-shadow ui-btn-corner-all ui-btn-inline ui-btn-up-c" aria-disabled="false"> <span class="ui-btn-inner ui-btn-corner-all "> <span class="ui-btn-text">>25</span> </span> <input type="button"
  class="qtyInput ui-btn-hidden" data-create="false" value=">25" data-inline="true" data-remember=">25" data-flag="false" id="qty10" aria-disabled="false"> </div> <input type="hidden" value="" id="mengenfeld10" name="menge10"> </div> </li> </ul> <input type="hidden" value="10" name="artikel_anzahl"> </div> <div class="buttonBar ui-corner-bottom ui-btn-up-c"> <div data-theme="c" data-create="false" class="cleanUp ui-corner-all ui-controlgroup ui-controlgroup-horizontal" data-type="horizontal" data-role="controlgroup"> <div class="ui-controlgroup-controls"> <div class="ui-radio"> <input data-create="false" checked="checked"             type="radio" value="1" id="radio_add_one" name="radio_add" data-theme="c"> <label for="radio_add_one" data-corners="true" data-shadow="false" data-iconshadow="true" data-wrapperels="span" data-theme="c" class="ui-btn ui-btn-up-c ui-radio-on ui-btn-active ui-corner-left"> <span class="ui-btn-inner ui-corner-left"> <span class="ui-btn-text">+1</span> </span> </label> </div> <div class="ui-radio"> <input data-create="false"
 type="radio" value="2" id="radio_add_two" name="radio_add" data-theme="c"> <label for="radio_add_two" data-corners="true" data-shadow="false" data-iconshadow="true" data-wrapperels="span" data-theme="c" class="ui-btn ui-btn-up-c ui-radio-off ui-radio-off"> <span class="ui-btn-inner ui-radio-off"> <span class="ui-btn-text">+2</span> </span> </label> </div> <div class="ui-radio"> <input data-create="false"
 type="radio" value="10" id="radio_add_three" name="radio_add" data-theme="c"> <label for="radio_add_three" data-corners="true" data-shadow="false" data-iconshadow="true" data-wrapperels="span" data-theme="c" class="ui-btn ui-btn-up-c ui-radio-off ui-radio-off"> <span class="ui-btn-inner ui-radio-off"> <span class="ui-btn-text">+10</span> </span> </label> </div> <div data-corners="true" data-shadow="true" data-iconshadow="true" data-wrapperels="span" data-icon="basket" data-iconpos="left" data-theme="e" data-inline="true" class="ui-btn ui-btn-up-e ui-btn-inline ui-btn-icon-left" aria-disabled="false"> <span class="ui-btn-inner"> <span class="ui-btn-text">in den Warenkorb</span> <span class="ui-icon ui-icon-basket ui-icon-shadow">&nbsp;</span> </span>  <input type="button" data-create="false" data-theme="e" data-iconpos="left" data-icon="basket" class="basketSubmitter itemTrigger ui-btn-hidden" data-inline="true" value="in den Warenkorb" aria-disabled="false"> </div> <div data-corners="true" data-shadow="true" data-iconshadow="true" data-wrapperels="span" data-icon="trash" data-iconpos="notext" data-theme="e" title="Reset" class="ui-btn ui-btn-icon-notext ui-corner-right ui-controlgroup-last ui-btn-up-e" aria-disabled="false"> <span class="ui-btn-inner ui-corner-right ui-controlgroup-last"> <span class="ui-btn-text">Reset</span> <span class="ui-icon ui-icon-trash ui-icon-shadow">&nbsp;</span> </span> <input type="button" data-create="false" value="Reset" name="deleteQty" id="deleteQty" data-iconpos="notext" data-theme="e" data-icon="trash" class="ui-btn-hidden" aria-disabled="false"> </div> </div> </div> </div> </div> </div> <div data-icon="info" data-theme="c" data-collapsed="true" data-role="collapsible" class="ui-collapsible ui-collapsible-inset ui-collapsible-collapsed ui-block-b"> <h3 class="ui-collapsible-heading ui-collapsible-heading-collapsed"> <a class="ui-collapsible-heading-toggle ui-btn ui-btn-icon-left ui-btn-up-c" href="#" > <span class="ui-btn-inner"> <span class="ui-btn-text">Info
 <span class="ui-collapsible-heading-status">Anklicken um Inhalte anzuzeigen</span> </span> </span> </a> </h3> <div class="ui-collapsible-content ui-body-c ui-collapsible-content-collapsed" aria-hidden="true"> <div class="ui-box-inner"> <p>- 1-9_86278, Soft-BH gen.</p> <p>Artikel : 86278, Farbe : Weiss/300, Grösse : 80B</p> <p></p> </div> </div> </div> </ul> </div> </div> </div> </div> </div> </div> </form> </div>
4

1 回答 1

1

谢谢大家的提示。原来是 HTML 响应中的一个错误,我忘记在我正在做的检查中关闭列表元素。

现在它起作用了。

你的提示都很好,所以让他们回答,这样我就可以投票了!

谢谢!

于 2013-03-12T22:56:05.913 回答