Ext框架学习 (三) Ext.Ajax类

 

Class Ext.Ajax

包:

Ext

定义于:

Connection.js

类:

Ajax

基类:

Connection

全局ajax请求类。提供一个简单的方式提交ajax请求,有很大的弹性。用法实例:

Global Ajax request class. Provides a simple way to make Ajax requests with maximum flexibility. Example usage:

// Basic request

//基本请求

Ext.Ajax.request({

   url: 'foo.php',

   success: someFn,

  failure: otherFn,

   headers: {

       'my-header': 'foo'

   },

   params: { foo: 'bar' }

});

// Simple ajax form submission

Ext.Ajax.request({

    form: 'some-form',

    params: 'foo=bar'

});

// Default headers to pass in every request

//每次请求默认的headers

Ext.Ajax.defaultHeaders = {

    'Powered-By': 'Ext'

};

// Global Ajax events can be handled on every request!

//全局 ajax事件,在每次请求时被处理。

Ext.Ajax.on('beforerequest', this.showSpinner, this);



This class is a singleton and cannot be created directly.

这个类是单立的,不能被直接创建。

Config Options

配置选项:

Config Options

Defined By

 

listeners : Object

A config object containing one or more event handlers to be added to this object during initialization. This should b...

包含一个或多个事件处理器的配置对象,在对象初始化时添加 example for attaching multiple handlers at once.

Observable

Public Properties

公共方法

Property

Defined By

定义在

 

autoAbort : Boolean

Whether a new request should abort any pending requests. (defaults to false)

这个值决定一个未决(pending)请求是否被终止。默认为false.

Ajax

 

defaultHeaders : Object

An object containing request headers which are added to each request made by this object. (defaults to undefined)

包含请求标头的对象在每次请求时用这个对象来添加,默认为undefine.

Ajax

 

disableCaching : Boolean

True to add a unique cache-buster param to GET requests. (defaults to true)

为真是添加一个唯一的cache-buster参数到get访问中。

Ajax

 

extraParams : Object

An object containing properties which are used as extra parameters to each request made by this object. (defaults to...

这个对象为每次请求添加额外的参数。

Ajax

 

method : String

The default HTTP method to be used for requests. Note that this is case-sensitive and should be all caps (defaults ...

默认请求的http方法。注意,它是case-sensitive的,应该all caps.(不懂这两个词的意思。)

Ajax

 

timeout : Number

The timeout in milliseconds to be used for requests. (defaults to 30000)
请求过期的时间(毫秒),默认为30000

Ajax

 

url : String

The default URL to be used for requests to the server. (defaults to undefined)

要访问的url

Ajax

Public Methods

公共方法

Method

定义

abort[Number transactionId] ) : void

Aborts any outstanding request.

终止任何停止的请求。

Parameters:

Returns:

Connection

 

addEvents( Object object ) : void

Used to define events on this Observable

中定义一个事件

Parameters:

Returns:

Observable

 

addListener( String eventName, Function handler, [Object scope], [Object options] ) : void

Appends an event handler to this component

为这个组件附加一个事件处理器

Parameters:

上下文。

上下文。

delayed by the specified number of milliseconds. If the event fires again within that time, the original handler is not invoked, but the new handler is scheduled in its place.

single: true,

delay: 100,

forumId: 4

fn:

scope:

delay: 100

},

fn:

scope:

},

fn:

scope:

}

scope:

Returns:

Observable

posted on 2008-03-31 15:48 GodSpeed 阅读(493) 评论(1)  编辑 收藏

评论

#1楼  2008-04-08 23:52 蓝奇高级验证码识别引擎QQ:631753663 [未注册用户]

出售蓝奇高级验证码识别引擎,可准确识别新浪动网淘宝CSDN等多种复杂验证码。

输出为一个标准DLL,可供VB,VC,Delphi,C#.NET,VB.NET,模拟精灵,按键精灵等多平台调用,调用方法简单,几行代码即可完成。独具特色的边缘检测字符分离、旋转倾斜纠正和通用字符匹配算法(无论字体和大小), 使得该引擎对于像新浪、动网、淘宝、CSDN等多种验证码均有不错的识别率,是一款效果较为理想的验证码识别引擎。附详细的调用实例和代码注释等相关技术文档。

官方网站 - http://www.purejoy.cn/yzm_advocr
识别效果怎么样一试就知道 - DEMO下载 http://www.purejoy.cn/yzm_advocr/advocr.rar
  回复  引用  查看    


标题  
姓名  
主页
Email (只有博主才能看到) 
验证码 *  看不清,换一张
内容(请不要发表任何与政治相关的内容)  
  登录  使用高级评论  新用户注册  返回页首  恢复上次提交      
 
另存  打印
最新IT新闻:
 


<2008年3月>
2425262728291
2345678
9101112131415
16171819202122
23242526272829
303112345

导航

统计

与我联系

常用链接

留言簿

我参加的小组

我参与的团队

我的标签

随笔档案(35)

搜索

最新评论

阅读排行榜

评论排行榜