继承自 Ajax.Request
当请求的url返回一段HTML而你想把它直接放置到页面中一个特定的元素的时候被用到。 如果url的返回<script> 的块并且想在接收到时就执行它的时候也可以使用该对象。含有脚本的时候使用 evalScripts 选项。
| Property | Type | Kind | Description |
|---|---|---|---|
| containers | Object | instance | 这个对象包含两个属性:AJAX请求成功执行的时候用到 containers.success , 否则的话用到 containers.failure 。 |
| Method | Kind | Arguments | Description |
|---|---|---|---|
| [ctor](container, url, options) | constructor | container:this can be the id of an element, the element object itself, or an object with two properties - object.success element (or id) that will be used when the AJAX call succeeds, and object.failure element (or id) that will be used otherwise. url: the url to be fetched, options: AJAX options | 创建一个用给定的选项请求给定的url的一个实例。 |
| updateContent() | (none) | 这个方法通常不会被外部调用。 当响应到达的时候,被这个对象自己调用。 它会用HTML更新适当的元素或者调用在 insertion 选项中传入的方法-这个方法将被传入两个参数, 被更新的元素和响应文本。 |
继承自Ajax.Base。这个类重复生成并使用 Ajax.Updater 对象来刷新页面中的一个元素。或者执行 Ajax.Updater 可以执行的其它任务。更多信息参照 Ajax.Updater 参考 。
| Property | Type | Kind | Description |
|---|---|---|---|
| container | Object | 这个值将直接传入Ajax.Updater的构造方法。 | |
| url | String | instance | 这个值将直接传入Ajax.Updater的构造方法。 |
| frequency | Number | instance | 两次刷新之间的间隔 (不是频率) ,以秒为单位。 默认2秒。 This 当调用 Ajax.Updater 对象的时候,这个数将和当前的 decay 相乘。 |
| decay | instance | 重负执行任务的时候保持的衰败水平。 | |
| updater | Ajax.Updater | instance | 最后一次使用的 Ajax.Updater 对象 |
| timer | Object | instance | 通知对象该下一次更新时用到的JavaScript 计时器。 |
| Method | Kind | Arguments | Description |
|---|---|---|---|
| [ctor](container, url, options) | constructor | container:this can be the id of an element, the element object itself, or an object with two properties - object.success element (or id) that will be used when the AJAX call succeeds, and object.failure element (or id) that will be used otherwise. url: the url to be fetched, optio |