<cffunction name="getBackgrounds" access="public" returntype="query">
<cfargument name="dsn" type="string" required="true" />
<cfargument name="page" type="string" required="false" />
<cfset var getBackground="" />
<cfquery name="getBackground" datasource="#arguments.dsn#">
SELECT page_id , photo
FROM page_photos
WHERE page_id = <cfqueryparam cfsqltype="cf_sql_integer" value="#Trim( arguments.page )#" />
</cfquery>
<cfreturn getBackground>
</cffunction>
jQuery(function ($) {
$.supersized({
slide_interval: 6000,
transition: 1,
transition_speed: 1000,
slide_links: 'false',
slides: [ < cfoutput query = "getBackground" > {
image: '#getBackground.photo#'
} < cfif getBackground.CurrentRow lt getBackground.RecordCount > , < /cfif>
</cfoutput >
]
});
});
但我得到一个错误。我之前尝试过类似的东西并且它正在工作,但我找不到那个例子。有谁看到我做错了什么?