+ -
当前位置:首页 → 问答吧 → ajax返回的html中css无效

ajax返回的html中css无效

时间:2011-09-05

来源:互联网

$.ajax({
type:"GET",
url:openurl,
dataType:"html",
complete:function(req, err){
$("div1").append(req.responseText);
},
error:function(){
alert("加载失败");
}
});

在head中的CSS对返回来的html无法显示。

作者: wengfeiyan   发布时间: 2011-09-05

$.ajax({
type:"GET",
url:openurl,
dataType:"html",
complete:function(req, err){
$("div1").append(req);},
error:function(){
alert("加载失败");
}
});

作者: calmcrime   发布时间: 2011-09-05