0
我想從我的javascript文件中追加一些html標籤。我發現主題(樣式)不適用於append方法中新添加的HTML元素。我在我的html文件中使用jquery mobile css和js樣式。這是我的js文件;如何將主題應用於HTML裏面的append()方法
var callback;
function call(uid,pw) {
callback=true;
$.getJSON("json.jsp" + "?uid=" + uid + "&rdm=" + Math.random(),
function(data){
var arr=data.menu.split(",");
$("#cont").empty();
$.each(arr, function(key, val) {
$("#cont").append("<ul data-role='listview' data-divider-theme='b' data-inset='true'><li data-theme='c'><a href='#page1' data-transition='slide'>" + val + "</a></li></ul>");
});
callback=false;
}
);
}
可能重複[未捕獲的ReferenceError:未定義刷新](http://stackoverflow.com/questions/19513121/uncaught-referenceerror-刷新此結果不定義) – Omar