English 中文(简体)
jquery ajax not Plus <link> in <head>tags in IE
原标题:jquery ajax not adding <link> in <head> tags in IE
  • 时间:2011-01-21 14:14:32
  •  标签:
  • jquery

我正在通过美国宇宙航空研究开发机构装上一页,并把它放在一个DIV中。 包括超文本标签和所有标签。 似乎没有浏览器对此表示担忧,但以下事实除外:<代码><head> 各项内容从永无上载电离层电离层电离层电离层,但在电离层流放电离层中也是如此。

能否让<代码>和>;标题和“t”中的内容也能够装载,或者我是否必须将这些内容放在正文中?

包括<代码>< 标题和>;和<link>。 但是,<代码><e> 元件可做罚款。 因此,我可以用我的阿贾克斯装上我的外部风格。 是否有办法,或者我是否必须把它放在安理会?

提前感谢。

例如:

// page to load
<html>
<head>
    <link href="{$cssLink}" type="text/css" rel="stylesheet"> // doesn t load
    <style type="text/css">
    /* CSS bla does work*/
    </style>
</head>
<body>
    <div id="testPage_content" class="content">
</div>
</body>
</html>

如果你在你的回答中需要的话,我会发出一个叫.。

// ask for the page
$.ajax(
{
    url: "Scripts/loader.php",  
    type: "GET",        
    data: data, // created above this call
    cache: false,
    success: function (html) 
    {               
        //add the content retrieved from ajax and put it in the #content div
        $( #content ).html(html);       

        // only use fading if opacity is supported          
        if($.support.opacity)
        {
            $( #loading ).hide();
            $( #content ).fadeIn();
        }
    }
});
最佳回答

确实,你应当使用<代码><iframe>要素,以装载“完整”网站(有<代码><html>“人与人”及“带”;“头与”;标签。 在其他情况下,该数值为100%。

我指的是,要脱胎的工作是新生的。

success: function (html) 
{               
    //add the content retrieved from ajax and put it in the #content div
    var stripped = $(html),
        head     = document.getElementsByTagName( head )[0] || document.documentElement;

    stripped.find( head ).contents().each(function(index, node) {
        if(node.nodeType !== 3) {
           node.setAttribute( data-insertID ,  foobar );
           head.appendChild(node, head.firstChild);
        }
    });

    $( #content ).html(stripped.find( body ).contents());       

    // only use fading if opacity is supported          
    if($.support.opacity)
    {
        $( #loading ).hide();
        $( #content ).fadeIn();
    }
}

删除:

$( head ).find( [data-insertID] ).remove();

这将占用你收到的网站<代码>标题的所有节点,并将其输入你的实际网站。 之后,它从<条码>和代号;人与人;标签上获得了所有节点,如果工作,请让我知道:]

问题回答

暂无回答




相关问题
getGridParam is not a function

The HTML: <a href="javascript:void(0)" id="m1">Get Selected id s</a> The Function: jQuery("#m1").click( function() { var s; s = jQuery("#list4").getGridParam( selarrrow )...

selected text in iframe

How to get a selected text inside a iframe. I my page i m having a iframe which is editable true. So how can i get the selected text in that iframe.

jQuery cycle page with links

I am using the cycle plugin with pager functionality like this : $j( #homebox ) .cycle({ fx: fade , speed: fast , timeout: 9000, pager: #home-thumbs , ...

jquery ui dialog opens only once

I have a button that opens a dialog when clicked. The dialog displays a div that was hidden After I close the dialog by clicking the X icon, the dialog can t be opened again.

jConfirm with this existing code

I need help to use jConfirm with this existing code (php & Jquery & jAlert). function logout() { if (confirm("Do you really want to logout?")) window.location.href = "logout.php"; } ...

Wrap text after particular symbol with jQuery

What I m trying to do, is wrap text into div inside ll tag. It wouldn t be a problem, but I need to wrap text that appears particularly after "-" (minus) including "minus" itself. This is my html: &...

热门标签