You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

25 lines
456 B

  1. $(document).ready(function(){
  2. $.ajax({
  3. url:'./zz-fx/saomaurl.php', //请求地址
  4. type: "post", //请求方式
  5. data:{},
  6. dataType: "json",
  7. success: function (data) {
  8. console.log(data);
  9. if(data.code == 0){
  10. $("#my_code").attr("src",data.url);
  11. }else{
  12. alert("获取失败");
  13. }
  14. },
  15. fail: function (date) {
  16. // 此处放失败后执行的代码
  17. }
  18. });
  19. })