-  操作DOM  6.2.1 更新DOM  6.2.2 插入DOM  - 2 - 本文档使用 书栈(BookStack.CN) 构建  6.2.3 删除DOM  6.3 操作表单  6.4 操作文件  6.5 AJAX  6.6 Promise  6.7 Canvas  7 jQuery  7.1 选择器  7.1.1 层级选择器  7.1.2 查找和过滤  7.2 操作DOM  7.2.1 修改DOM结构  7 好处要等到后面学了  AJAX以后才能体会到。  没有generator之前的黑暗时代,用AJAX时需要这么写代码:  1. ajax('http://url-1', data1, function (err, result) {  2.     if (err) {  3.         return handle(err);  4.     }  5.     ajax('http://url-2' (err, result) {  6.         if (err) {  7.             return handle(err);  8.         }  9.         ajax('http://url-3', data3, function (err, result) {  10.             if (err) {  11.                 return 0 码力 |
          264 页 |
          2.81 MB
          | 10 月前 3 
 
-  add_sideframe_item()
add_sideframe_button()
Open link in modal
add_modal_item()
add_modal_button()
POST action
add_ajax_item()
The basic form for using any of these is:
def populate(self):
self.toolbar.add_link_item( # placeholder_text argument to define the text displayed inside the input before you type.
The widget uses an ajax request to try to find pages match. It will try to find case insensitive matches amongst
public and text_enabled.
class cms.plugin_base.PluginMenuItem
__init___(name, url, data, question=None, action='ajax', attributes=None)
Creates an item in the plugin / placeholder menu
Parameters
• name – Item name 0 码力 |
          296 页 |
          1.79 MB
          | 6 月前 3 
 
-  add_sideframe_item()
add_sideframe_button()
Open link in modal
add_modal_item()
add_modal_button()
POST action
add_ajax_item()
The basic form for using any of these is:
def populate(self):
self.toolbar.add_link_item( # placeholder_text argument to define the text displayed inside the input before you type.
The widget uses an ajax request to try to find pages match. It will try to find case insensitive matches amongst
public and text_enabled.
class cms.plugin_base.PluginMenuItem
__init___(name, url, data, question=None, action='ajax', attributes=None)
Creates an item in the plugin / placeholder menu
Parameters
• name – Item name 0 码力 |
          298 页 |
          1.79 MB
          | 6 月前 3 
 
-  add_sideframe_item()
add_sideframe_button()
Open link
in modal
add_modal_item()
add_modal_button()
POST
action
add_ajax_item()
The basic form for using any of these is:
def populate(self): 
   self.toolbar.add_link_item( placeholder_text argument to define the text displayed inside the input before
you type.
The widget uses an ajax request to try to find pages match. It will try to find case
insensitive matches amongst public and Parameters:
class cms.plugin_base.PluginMenuItem
__init___(name, url, data, question=None, action='ajax', attributes=None)
Creates an item in the plugin / placeholder menu
name – Item name (label)
url – 0 码力 |
          417 页 |
          1.68 MB
          | 6 月前 3 
 
-  add_sideframe_item()
add_sideframe_button()
Open link
in modal
add_modal_item()
add_modal_button()
POST
action
add_ajax_item()
The basic form for using any of these is:
def populate(self): 
   self.toolbar.add_link_item( placeholder_text argument to define the text displayed inside the input before
you type.
The widget uses an ajax request to try to find pages match. It will try to find case
insensitive matches amongst public and text_enabled.
class cms.plugin_base.PluginMenuItem
__init___(name, url, data, question=None, action='ajax', attributes=None)
Creates an item in the plugin / placeholder menu
name – Item name (label)
url – 0 码力 |
          413 页 |
          1.67 MB
          | 6 月前 3 
 
-  add_sideframe_item()
add_sideframe_button()
Open link in modal
add_modal_item()
add_modal_button()
Ajax POST action
add_ajax_item()
The basic form for using any of these is:
Note that although these toolbar items class cms.forms.fields.PageSmartLinkField(max_length=None, min_length=None,
placeholder_text=None, ajax_view=None, *args, **kwargs)
A field making use of cms.forms.widgets.PageSmartLinkWidget. This field placeholder_text argument to define the text displayed inside the input before
you type.
The widget uses an ajax request to try to find pages match. It will try to find
case-insensitive matches amongst public and 0 码力 |
          518 页 |
          1.66 MB
          | 6 月前 3 
 
-  XMLHttpRequest 接口,允许 JavaScript  周边大事记  历史  - 24 - 本文档使用 书栈(BookStack.CN) 构建  发出 HTTP 请求,为后来大行其道的 Ajax 应用创造了条件。  2000年,KDE 项目重写了浏览器引擎 KHTML,为后来的 WebKit 和  Blink 引擎打下基础。这一年的10月23日,KDE 2.0发布,第一次将  KHTML 编程框架的时代  开始来临。  2004年,WHATWG 组织成立,致力于加速 HTML 语言的标准化进程。  2005年,苹果公司在 KHTML 引擎基础上,建立了 WebKit 引擎。  2005年,Ajax 方法(Asynchronous JavaScript and XML)正  式诞生,Jesse James Garrett 发明了这个词汇。它开始流行的标  历史  - 25 - 本文档使用 书栈(BookStack 个地方,其他任务无法执行。JavaScript 语言本身并不慢,慢的是  读写外部数据,比如等待 Ajax 请求返回结果。这个时候,如果对方  服务器迟迟没有响应,或者网络不通畅,就会导致脚本的长时间停滞。  如果排队是因为计算量大,CPU 忙不过来,倒也算了,但是很多时候  CPU 是闲着的,因为 IO 操作(输入输出)很慢(比如 Ajax 操作  从网络读取数据),不得不等着结果出来,再往下执行。JavaScript 0 码力 |
          540 页 |
          3.32 MB
          | 10 月前 3 
 
-   you could do something like:
{% block jquery %}