js内容汇总

一、ajax请求(jquery)

$.ajax({
     type: "POST",
     url: "ChangePassword",
     data: { "oldpassword": oldpass, "password": newpass},
     dataType: "json",
     success: function (data) {
          if (data.msg == "修改成功!") {
               //alert("修改成功!");
               //window.wxc.xcConfirm("修改成功", window.wxc.xcConfirm.typeEnum.success);
               //location.reload();
          } else {
               //$("#show").text(data.msg);
               //document.getElementById("imgshow").style.display = 'block'; 
          }
     }
})

二、Jquery 弹出对话框插件xcConfirm.js

https://blog.csdn.net/nihaoqiulinhe/article/details/80136707

二、js添加到收藏夹

function AddFavorite(sURL, sTitle) {
    try {
        window.external.addFavorite(sURL, sTitle);
    }
    catch (e) {
        try {
            window.sidebar.addPanel(sTitle, sURL, "");
        }
        catch (e) {
            alert("加入收藏失败,请使用Ctrl+D进行添加");
        }
    }
}

你可能感兴趣的:(js内容汇总)