<body> <button id="SubmitButton">点击跳转</button> <img src="" alt="条形码" id="BarCode" /> <img src="" alt="二维码" id="QRCode" />
=========================================================
url: "/Mobile/AppointActivity/AppointActivityMbHandler.ashx?type=CreateBarCodeAndQRCode", type: "post", data: { "BID": '<%=encBID%>',//商户BID "ApOrderID": "O20180110145126184320" //预约子订单号 }, success: function (obj) { var obj = JSON.parse(obj); if (obj.code == "1") { alert("成功"); if (obj.msg = "获取图片成功") { $('#BarCode').attr('src', obj.data["BarCode"]); $('#QRCode').attr('src', obj.data["QRCode"]); } return; } }, error: function () { alert("失败"); } }) //alert("ajax完成"); }) }) </script>