1.在一个方法之外,一定要有个jQuery的全局方法启动,例如我要调用a方法做ajax提交,那么在页面的任一<script></script>标签内,加入jQuery(function(){}),而且这句话要放在全局,不能在方法块里面,否则a方法的jQuery.post()则不会起作用:
<head>
<script>
jQuery(function(){})
function a(url){
jQuery.post(url);
}
</script>
</head>
1.在一个方法之外,一定要有个jQuery的全局方法启动,例如我要调用a方法做ajax提交,那么在页面的任一<script></script>标签内,加入jQuery(function(){}),而且这句话要放在全局,不能在方法块里面,否则a方法的jQuery.post()则不会起作用:
<head>
<script>
jQuery(function(){})
function a(url){
jQuery.post(url);
}
</script>
</head>

2023-03-10
0万阅读

2023-02-27
0万阅读

2023-02-23
6万阅读

2023-02-22
6万阅读

2023-02-12
8万阅读

2023-02-12
3万阅读

2023-01-19
8万阅读

2023-01-17
4万阅读

2023-01-17
4万阅读

2023-01-17
2万阅读

2023-03-10
0万阅读

2023-02-27
0万阅读

2023-02-23
6万阅读

2023-02-22
6万阅读

2023-02-12
8万阅读

2023-02-12
3万阅读

2023-01-19
8万阅读

2023-01-17
4万阅读

2023-01-17
4万阅读

2023-01-17
2万阅读