我想用AJAX調用的webservice填充popover(從bootstrap)。通過調用webservice填充popover bootstrap
我想:
$.ajax({
type: "POST",
url: "myURL?action=fetchData&ID=123",
success: function(msg) {
$('.key_cal').popover({
title:"User Profile",
placement:'right',
content:"<h5>Name: "+msg[0].firstName+"</h5>",
html: true
});
}
});
但我需要調用AJAX的酥料餅裏面填充的內容,但我不知道;你可以幫我嗎?
現在,而不是在我的網址(AJAX)與123硬編碼ID我想使用點擊popover的元素的ID。 (我已通過每個元素的ID作爲一個關鍵)
非常感謝提前。
您的JavaScript不完整且格式不正確。你能證明它更具可讀性嗎? –