nns4
 1 <html data-dpr="1" style="font-size: 50px;">
 2 
 3 <head>
 4 
 5 <script src="js/jquery-2.1.0.js" type="text/javascript" charset="utf-8"></script>
 6 </head>
 7 
 8 <body style="">
 9 
10 <script type="text/javascript">
11 var id = "123";
12 $.ajax({
13 url: \'http://ai2800.com/api.php/Goods/type_goods/type/xsgss\',
14 type: \'post\',
15 dataType: "json",
16 // data:{wurl:w_url,murl:m_url}, 
17 async: false,
18 error: function() {},
19 success: function(data) {
20 id = data;
21 console.log(id)
22 
23 }
24 })
25 
26 console.log(id);
27 </script>
28 
29  
30 
31 
32 <script type="text/javascript">
33 function load(val) {
34 $.ajax({
35 url: \'http://ai2800.com/api.php/Goods/type_goods/type/xsgss\',
36 type: \'post\',
37 dataType: "json",
38 // data:{wurl:w_url,murl:m_url}, 
39 async: false,
40 error: function() {},
41 success: function(dat) {
42 id = dat;
43 val(dat)
44 
45 }
46 })
47 }
48 load(function(data) {
49 console.log(data)
50 })
51 </script>
52 
53 
54 <script type="text/javascript">
55 function s() {
56 var id
57 $.ajax({
58 url: \'http://ai2800.com/api.php/Goods/type_goods/type/xsgss\',
59 type: \'post\',
60 dataType: "json",
61 async: false,
62 error: function() {},
63 success: function(dat) {
64 id = dat;
65 }
66 })
67 return id;
68 }
69 var b = s()
70 console.log(b)
71 </script>
72 
73 
74 <script type="text/javascript">
75 var id
76 $.ajax({
77 url: \'http://ai2800.com/api.php/Goods/type_goods/type/xsgss\',
78 type: \'post\',
79 dataType: "json",
80 async: false,
81 error: function() {},
82 success: function(dat) {
83 var id = dat;
84 bb()
85 }
86 })
87 
88 function bb() {
89 console.log(id)
90 }
91 </script>
92 
93 </body>
94 
95 </html>

 

分类:

技术点:

相关文章:

  • 2022-01-06
  • 2021-07-03
  • 2021-11-15
  • 2021-06-26
  • 2022-12-23
  • 2021-05-08
  • 2021-09-14
猜你喜欢
  • 2021-12-26
  • 2022-01-30
  • 2022-01-29
  • 2021-07-11
  • 2021-06-14
  • 2022-01-31
  • 2022-01-23
相关资源
相似解决方案