jquery
2014-12-04 66 views 0 likes 
0
$("#content").html("<h1>Valid Types</h1><ul><li><a href='" + SITE_URL + "/Custom_App/?app_type=frame&amp;session_id=" + session_id + "&amp;cart_id= " + cart_id + ">Custom Frame</a></li></ul>"); 

它只顯示:爲什麼下面的代碼不生成鏈接?

<h1>Valid Types</h1> 
<ul><li></li></ul> 
+0

連接正確... – 2014-12-04 14:07:43

+1

在href結束時的報價缺失 – Hacketo 2014-12-04 14:08:33

+0

謝謝。這解決了它 – AllisonC 2014-12-04 14:09:39

回答

2
$("#content").html("<h1>Valid Types</h1><ul><li><a href=\"" + SITE_URL + "/Custom_App/?app_type=frame&amp;session_id=" + session_id + "&amp;cart_id= " + cart_id + "\">Custom Frame</a></li></ul>"); 

它應該工作。

相關問題