如何将html放在jquery的附加内容和附加Div的网页中
$('.oo').append(
<div style="width:100%; min-height:35px; max-height:auto; margin-top:10px;">
<div style="height:auto; margin:2px 2px 2px 16px;">
<img src="image/xprin_load2_loader.gif" style="float:left; height:35px; width:35px; border-radius:5%;"/>
</div>
<div style="height:auto; margin: 5px 5px 5px 55px; text-align:left; box-shadow: 3px 0px 0px #4080ff;">
<b>: </b>
<span style="margin:2px 2px;"></span>
</div>
</div>
);
您只需在要附加的html周围添加引号
$('.oo').append(
' <div style="width:100%; min-height:35px; max-height:auto; margin-top:10px;">' +
+' <div style="height:auto; margin:2px 2px 2px 16px;">' + ' <img src="image/xprin_load2_loader.gif" style="float:left; height:35px; width:35px; border-radius:5%;"/>' + '</div>' + '<div style="height:auto; margin: 5px 5px 5px 55px; text-align:left; box-shadow: 3px 0px 0px #4080ff;">' + '<b>: </b>' + '<span style="margin:2px 2px;"></span>' + '</div>' + '</div>'
);
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句