---
title: "extjs4 ajax同步加载"
author: "chen2991101"
date: "2013-06-26T20:52:09Z"
tags: []
categories: ["Web前端"]
slug: "extjs4-ajax"
draft: false
lastmod: "2013-06-26T20:52:09Z"
id: 1894872
url: "https://chen2991101.iteye.com/blog/1894872"
---

平时我们用Ext.Ajax.request来跟后台进行交互，通过ajax使用的是异步的的方式来传递，但是有些情况需要用同步的方式来进行

```
Ext.Ajax.request({  
    async : false,//添加上这个属性就能实现同步的方式  
    url: 'page.php',  
    params: {  
        id: 1  
    },  
    success: function(response){  
        var text = response.responseText;  
        // process server response here  
    }  
}); 
```