我寫了一個jquery函數。這個調用coldfusion查詢來動態添加元素到垃圾郵件,但這是行不通的。任何人都可以說出錯嗎?如何在jquery tab中調用coldfusion查詢點擊功能
$('a.clikceble',$this).click(function(){
<cfloop query="GET_ALL_STUDENT_INFO_QUERY">
alert("inside");
$(".quick_time_dl a").attr("href", "index.cfm?event=location.index§ion=download&topic_id=<cfoutput>#URLDecode(url.topic_id)#</cfoutput>&video_id=<cfoutput>#URLDecode(url.video_id)#</cfoutput>&video_name=<cfoutput>#URLDecode(url_mov)#</cfoutput>&video_type=lif_mov");
$(".win_media_dl a").attr("href", "index.cfm?event=location.index§ion=download&topic_id=<cfoutput>#URLDecode(url.topic_id)#</cfoutput>&video_id=<cfoutput>#URLDecode(url.video_id)#</cfoutput>&video_name=<cfoutput>#URLDecode(url_wmv)#</cfoutput>&video_type=lif_wmv");
<cfif len(url_pdf)>
$("#url_pdf").attr("href", "../assets/teaching_notes_pdf/<cfoutput>#URLDecode(url_pdf)#</cfoutput>");
$(".pdf_desc").append($("#url_pdf"));
alert($(".pdf_desc").append($("#url_pdf")));
$("#url_pdf").show();
</cfif>
<cfif len(pdf_transcript)>
$("#pdf_transaction").attr("href", "../assets/teaching_notes_transcripts/<cfoutput>#URLDecode(pdf_transcript)#</cfoutput>");
$(".pdf_desc").append($("#pdf_transaction"));
alert($(".pdf_desc").append($("#pdf_transaction")));
$("pdf_transaction").show();
</cfif>
</cfloop>
我想你正在嘗試混合Coldfusion代碼和JavaScript代碼。好主意檢查這是看你的生成的代碼或張貼您生成的瀏覽器代碼以及。 – 2012-02-15 05:23:27