📜  javascript代码示例中的冒泡和捕获

📅  最后修改于: 2022-03-11 15:03:32.643000             🧑  作者: Mango

代码示例1
// prevent bubbling effect
function DownloadAsset(AssetId, e) {

    if (!e) var e = window.event
    e.cancelBubble = true;
    if (e.stopPropagation) e.stopPropagation();

    // your ajax call
    $.ajax({....})
}