jquery JavaScript ajax() post() get()无法改变全局变量的值
来源:互联网 发布:oracle 数据搜索引擎 编辑:程序博客网 时间:2024/06/05 05:06
jquery JavaScript ajax() post() get()无法改变全局变量的值
原因是async参数设置有问题,其其默认值为ture,改为false就可以修改全局变量的值
一。
可以在post(),get()前加
- $.ajaxSetup({
- async : false
- });
二。
直接使用$.ajax,如
Js代码
- $.ajax({
- type : "post",
- url : "register.do",
- data : "test=" + test,
- async : false,
- success : function(data){
- data = eval_r("(" + data + ")");
- aDataSet = data;
- }
- });
0 0
- jquery JavaScript ajax() post() get()无法改变全局变量的值
- jquery ajax的get post
- jquery ajax post get
- jQuery $ajax $post $get
- Jquery $.ajax/$.post/$.get
- jQuery的get,post Ajax函数
- Jquery的$.get $.post $.getJSON $.ajax
- jQuery ajax get与post的区别
- jquery ajax的post、get方式
- jquery $.ajax $.get $.post的区别
- Javascript-ajax的get/post方法
- php jquery ajax 无法传递POST值的问题
- JQuery 中的ajax的方法 ($.ajax,$.post.$get,$.jgetJSON)
- jQuery Ajax 实例 详细介绍$.ajax、$.post、$.get的使用
- JQuery .ajax .post .get 应用
- jQuery $.ajax() $.get() $.post() $.getJSON()
- jQuery-ajax-.get,.post方法
- Jquery:ajax post get提交
- Device Tree(一):背景介绍
- python mysql数据库编程
- quartz CronExpression表达式(转载)
- AudioQueue 音频队列 转
- Android学习笔记之ProgressBar案例分析
- jquery JavaScript ajax() post() get()无法改变全局变量的值
- UIImage图片处理
- 2014-12-22
- Week 1 Course Introduction
- 时间格式转换
- Storm入门
- 关于iOS8无法定位
- HDU 4265 Science! 最大流 二分 暴力
- POJ3233Matrix Power Series