【发布时间】:2014-08-05 20:45:15
【问题描述】:
好的,所以我做了这个 jquery,结果很好,但是 css 没有得到应用。有没有办法将 css 应用于结果?
function doSearch() {
//Send the AJAX call to the server
$.ajax({
//The URL to process the request
'url' : 'cf/inventoryQuery.cfm',
//The type of request, also known as the "method" in HTML forms
//Can be 'GET' or 'POST'
'type' : 'POST',
//Any post-data/get-data parameters
//This is optional
'data' : $("#SearchInventory").serialize(),
//The response from the server
'success' : function(data) {
$('#Results').html(data);
}
});
}
EDIT - 这是获取新内容的 div
<div id="Results" >
<cfoutput query="queryCars" maxrows="4">
<div class="Result">
<img src="images/samplecar.png" />
<div class="ResultText">
#strYear# #strMake# #strModel#
</div>
</div>
</cfoutput>
</div>
AJAX 调用返回的结果如下所示
<cfoutput query="queryCars" maxrows="4">
<div class="Result">
<img src="images/samplecar.png" />
<div class="ResultText">
#strYear# #strMake# #strModel#
</div>
</div>
</cfoutput>
所以它实际上是用完全相同的东西代替一件事。我的呼叫页面有一个 在标题中。
【问题讨论】:
标签: jquery css coldfusion