由于Ajax的火爆,所以我会重点介绍与它相关的一些技术。下面的文档已经写了很久了,由于上一篇的尖括号搞的我非常之烦,现在才贴出来,见谅。
我将从Window,XMLHttpRequest等这几个主要接口出发(Document前面已经描述了),描述客户端Javascript编程的主要轮廓。另外,值得注意的是,这个领域的变化仍然非常剧烈,我不保证我描述的东西都可用。无论是现在(我描述的东西还太新)还是以后(而且还没有定型)。
interface XMLHttpRequest {
attribute EventListener onreadystatechange;
readonly attribute unsigned short readyState;
void open(in DOMString method, in DOMString uri);
void open(in DOMString method, in DOMString uri, in boolean async);
void open(in DOMString method, in DOMString uri, in boolean async, in DOMString user);
void open(in DOMString method, in DOMString uri, in boolean async, in DOMString user, in DOMString password);
void setRequestHeader(in DOMString header, in DOMString value) raises(DOMException);
void send(in DOMString data) raises(DOMException);
void send(in Document data) raises(DOMException);
void abort();
DOMString getAllResponseHeaders();
DOMString getResponseHeader(in DOMString header);
attribute DOMString responseText;
attribute Document responseXML;
attribute unsigned short status;
// raises(DOMException) on retrieval
attribute DOMString statusText;
// raises(DOMException) on retrieval
};
interface Item {
readonly attribute boolean exists;
readonly attribute DOMString name;
};
interface IntegerItem : Item {
readonly attribute long value;
};
interface BooleanItem : Item {
attribute boolean value;
};
interface StringItem : Item {
readonly attribute DOMString value;
};
interface ContentItem : Item {
attribute Node nodeArg;
attribute unsigned long offset;
};
interface Match {
// MatchTestGroup
const unsigned short IS_EQUAL = 0;
const unsigned short IS_NOT_EQUAL = 1;
const unsigned short INT_PRECEDES = 2;
const unsigned short INT_PRECEDES_OR_EQUALS = 3;
const unsigned short INT_FOLLOWS = 4;
const unsigned short INT_FOLLOWS_OR_EQUALS = 5;
const unsigned short STR_STARTS_WITH = 6;
const unsigned short STR_ENDS_WITH = 7;
const unsigned short STR_CONTAINS = 8;
const unsigned short SET_ANY = 9;
const unsigned short SET_ALL = 10;
const unsigned short SET_NOT_ANY = 11;
const unsigned short SET_NOT_ALL = 12;
readonly attribute unsigned short test;
};
interface MatchInteger : Match {
readonly attribute DOMString name;
readonly attribute long value;
};
interface MatchBoolean : Match {
readonly attribute DOMString name;
readonly attribute boolean value;
};
interface MatchString : Match {
readonly attribute DOMString name;
readonly attribute DOMString value;
};
interface MatchContent : Match {
readonly attribute DOMString name;
readonly attribute Node nodeArg;
readonly attribute unsigned long offset;
};
interface MatchSet : Match {
readonly attribute Node nodeArg;
void addMatch(in Match add);
Match getMatch(in unsigned long index);
};
interface Segment : Match {
attribute Match criteria;
attribute DOMString order;
void addItem(in Item add);
MatchString createMatchString(in unsigned short test, in DOMString name, in DOMString value);
MatchInteger createMatchInteger(in unsigned short test, in DOMString name, in long value);
MatchBoolean createMatchBoolean(in unsigned short test, in DOMString name, in boolean value);
MatchContent createMatchContent(in unsigned short test, in DOMString name, in unsigned long offset, in Node nodeArg);
MatchSet createMatchSet(in unsigned short test);
StringItem createStringItem(in DOMString name);
IntegerItem createIntegerItem(in DOMString name);
BooleanItem createBooleanItem(in DOMString name);
ContentItem createContentItem(in DOMString name);
void getItem(in unsigned long index);
boolean getNext();
};
interface View {
void select(in Node boundary, in unsigned long offset, in boolean extend, in boolean add);
Segment createSegment();
boolean matchFirstSegment(inout Segment todo) raises(DOMException);
long getIntegerProperty(in DOMString name) raises(DOMException);
DOMString getStringProperty(in DOMString name) raises(DOMException);
boolean getBooleanProperty(in boolean name) raises(DOMException);
Node getContentPropertyNode(in DOMString name) raises(DOMException);
unsigned long getContentPropertyOffset(in DOMString name) raises(DOMException);
};
interface VisualView {
readonly attribute DOMString fontScheme;
readonly attribute unsigned long width;
readonly attribute unsigned long height;
readonly attribute unsigned long horizontalDPI;
readonly attribute unsigned long verticalDPI;
VisualCharacter createVisualCharacter();
VisualCharacterRun createVisualCharacterRun();
VisualFrame createVisualFrame();
VisualImage createVisualImage();
VisualFormButton createVisualFormButton();
VisualFormField createVisualFormField();
void select(in Node boundary, n unsigned long offset, in boolean extend, in boolean add);
void matchSegment(in VisualResource segment);
};
interface VisualResource {
};
interface VisualFont : VisualResource {
attribute DOMString matchFontName;
readonly attribute boolean exists;
readonly attribute DOMString fontName;
boolean getNext();
};
interface VisualSegment : VisualResource {
attribute boolean matchPosition;
attribute boolean matchInside;
attribute boolean matchContaining;
attribute long matchX;
attribute long matchY;
attribute long matchXR;
attribute long matchYR;
attribute boolean matchContent;
attribute boolean matchRange;
attribute Node matchNode;
attribute unsigned long matchOffset;
attribute Node matchNodeR;
attribute unsigned long matchOffsetR;
attribute boolean matchContainsSelected;
attribute boolean matchContainsVisible;
readonly attribute boolean exists;
readonly attribute Node startNode;
readonly attribute unsigned long startOffset;
readonly attribute Node endNode;
readonly attribute unsigned long endOffset;
readonly attribute long topOffset;
readonly attribute long bottomOffset;
readonly attribute long leftOffset;
readonly attribute long rightOffset;
readonly attribute unsigned long width;
readonly attribute unsigned long height;
readonly attribute boolean selected;
readonly attribute boolean visible;
readonly attribute unsigned long foregroundColor;
readonly attribute unsigned long backgroundColor;
readonly attribute DOMString fontName;
readonly attribute DOMString fontHeight;
boolean getNext();
};
interface VisualCharacter : VisualSegment {
};
interface VisualCharacterRun : VisualSegment {
};
interface VisualFrame : VisualSegment {
readonly attribute VisualSegment embedded;
};
interface VisualImage : VisualSegment {
readonly attribute DOMString imageURL;
readonly attribute boolean isLoaded;
};
interface VisualFormButton : VisualSegment {
readonly attribute boolean isPressed;
};
interface VisualFormField : VisualSegment {
readonly attribute DOMString formValue;
};
interface EmbeddingElement {
readonly attribute dom::Document contentDocument;
readonly attribute Window contentWindow;
};
// behavior is always special in ECMAScript, this is defined only for the benefit
// of other languages
interface TimerListener {
// what to put here?
};
interface AbstractView {
readonly attribute DocumentView document;
};
interface DocumentView {
readonly attribute AbstractView defaultView;
};
interface Window : views::AbstractView {
// self-references
readonly attribute Window window;
readonly attribute Window self;
// assigning this has special behavior in ECMAScript, but it is otherwise
// read only. specifically, in ES a string URI can be assigned to location,
// having the same effect as location.assign(URI)
readonly attribute Location location;
// name attribute of referencing frame/iframe/object, or name passed to
// window.open
attribute dom::DOMString name;
// global object of containing document
readonly attribute Window parent;
// global object of outermost containing document
readonly attribute Window top;
// referencing <html:frame>, <html:iframe>, <html:object>, <svg:foreignObject>,
// <svg:animation> or other embedding point, or null if none
readonly attribute dom::Element frameElement;
// one-shot timer
long setTimeout(in TimerListener listener, in long milliseconds);
void clearTimeout(in long timerID);
// repeating timer
long setInterval(in TimerListener listener, in long milliseconds);
void clearInterval(in long timerID);
};
interface DocumentWindow : views::DocumentView {
readonly attribute Location location;
};
interface Location {
attribute dom::DOMString href;
// pieces of the URI, per the generic URI syntax
attribute dom::DOMString hash;
attribute dom::DOMString host;
attribute dom::DOMString hostname;
attribute dom::DOMString pathname;
attribute dom::DOMString port;
attribute dom::DOMString protocol;
attribute dom::DOMString search;
void assign(in dom::DOMString url);
void replace(in dom::DOMString url);
void reload();
dom::DOMString toString();
};
分享到:
相关推荐
1.版本:matlab2014/2019a/2024a 2.附赠案例数据可直接运行matlab程序。 3.代码特点:参数化编程、参数可方便更改、代码编程思路清晰、注释明细。 4.适用对象:计算机,电子信息工程、数学等专业的大学生课程设计、期末大作业和毕业设计。 替换数据可以直接使用,注释清楚,适合新手
1.版本:matlab2014/2019a/2024a 2.附赠案例数据可直接运行matlab程序。 3.代码特点:参数化编程、参数可方便更改、代码编程思路清晰、注释明细。 4.适用对象:计算机,电子信息工程、数学等专业的大学生课程设计、期末大作业和毕业设计。 替换数据可以直接使用,注释清楚,适合新手
广东省关于人工智能赋能千行百业的若干措施.docx
湖北省数据条例(草案)(征求意见稿).docx
中软国际IT培训中心的培训教程,属于学习CSS网页设计的基础入门教程,讲一些原理和概念,高深的理论不太多。
Python Data Structures and Algorithms Minimal and clean example implementations of data structures and algorithms in Python 3. Contribute Thank you for your interest in contributing! There are many ways to contribute to the project. Start testing from here Take note when running all tests using unittest $ python3 -m unittest discover tests To run some specific tests you can do the following (e.g. sort) $ python3 -m unittest tests.test_sort Run all tests using pytest Make a note when $ python3 -m
TeamIDE-win-2.6.31Team IDE 集成MySql、Oracle、金仓、达梦、神通等数据库、SSH、FTP、Redis、Zookeeper、Kafka、Elasticsearch、M
内容概要:本文综述了C、C++、Python、Java这四种主流编程语言中,用于实现常见和高级算法的学习资料,覆盖范围广泛,从书籍、在线课程平台到GitHub上的开源代码仓库均有提及。每种语言都详述了推荐的学习资源及其优势,旨在满足不同程度学习者的需要。 适合人群:对算法实现有兴趣的学生、自学爱好者、开发者等。 使用场景及目标:帮助读者挑选合适的语言和资源深入理解算法的理论与实际编码技巧,适用于个人提升、项目实践或教学使用。 其他说明:文章提供了丰富的学习渠道和实战项目,既适合作为基础理论的学习,也适合于实际操作练习,尤其强调通过实做加深理解的重要性。
aiuiphone0000000000000000000
支持多场景回调开箱即用 原生仿百度登录验证.zip
2023 年“泰迪杯”数据分析技能赛B题-企业财务数据分析与造假识别 完整代码
Levenshtein Python C 扩展模块包含用于快速计算 Levenshtein 距离和字符串相似度的函数内容需要维护者介绍文档执照历史源代码作者需要维护者我 (Mikko Ohtamaa) 目前不维护此代码。我只是为了方便起见才将其拉到 Github 上的(之前在公共存储库中不可用)。因此,如果您提交了任何问题,我都不会调查。介绍Levenshtein Python C 扩展模块包含用于快速计算的函数Levenshtein(编辑)距离和编辑操作字符串相似度近似中位数字符串,以及一般字符串平均值字符串序列和集合相似度它同时支持普通字符串和 Unicode 字符串。需要 Python 2.2 或更新版本。StringMatcher.py 是一个基于 Levenshtein 构建的类似 SequenceMatcher 的示例类。它缺少一些 SequenceMatcher 的功能,但又有一些额外的功能。Levenshtein.c 也可以用作纯 C 库。您只需在编译时定义 NO_PYTHON 预处理器符号 (-DNO_PYTH
基于OpenCV像素检测的Onmyoji游戏脚本
Pythonbot高斯网格图射线投射网格图激光雷达至网格地图k-均值对象聚类矩形接头大满贯迭代最近点 (ICP) 匹配FastSLAM 1.0路径规划动态窗口方法基于网格的搜索Dijkstra 算法A* 算法D*算法D* Lite 算法位场算法基于网格的覆盖路径规划国家网格规划偏极采样车道采样概率路线图(PRM)规划快速探索随机树(RRT)回程时间*RRT* 和 reeds-shepp 路径LQR-RRT*五次多项式规划Reeds Shepp 规划基于LQR的路径规划Frenet 框架中的最佳轨迹路径追踪移动到姿势控制斯坦利控制后轮反馈控制线性二次调节器 (LQR) 速度和转向控制模型预测速度和转向控制采用 C-GMRES 的非线性模型预测控制手臂导航N关节臂对点控制带避障功能的手臂导航航空导航无人机三维轨迹跟踪火箭动力着陆双足动物倒立摆双
可信任的企业4.0生态系统.pptx
学生信息包括:学号,姓名,年龄,性别,出生年月,地址,电话,E-mail等。试设计一学生信息管理系统,系统提供菜单方式作为人机界面并具有如下功能: 学生信息录入功能 学生信息浏览功能 按学号、姓名等进行查询、排序功能 2、要求界面简单明了;对输入的数据具有有效性检查能力,比如输入的成绩不在0~100之间,要求重新输入;
原生js谷歌网页电吉他弹奏源码.rar
原生js微信分享到朋友圈浮动层代码.zip
第7章 聚类算法 - 作业 - 副本.ipynb
AICon 2024全球人工智能开发与应用大会(脱敏)PPT合集,共30份。 AI辅助编程测评与企业实践 SmartEV和AI 蔚来的思考与实践 下一代 RAG 引擎的技术挑战与实现 书生万象大模型的技术演进与应用探索 人工智能行业数据集构建及模型训练方法实践周华 全方位评测神经网络模型的基础能力 千亿参数 LLM 的训练效率优化 向量化与文档解析技术加速大模型RAG应用落地 基于大模型的缺陷静态检查 多环境下的 LLM Agent 应用与增强 大模型在华为推荐场景中的探索和应用 大模型在推荐系统中的落地实践 大模型的异构计算和加速 大模型辅助需求代码开发 大语言模型在法律领域的应用探索 大语言模型在计算机视觉领域的应用 大语言模型的幻觉检测 小米大模型端侧部署落地探索 快手可图大模型的技术演进与应用探索 提升大模型知识密度,做高效的终端智能 电商大模型及搜索应用实践 百度大模型 原生安全构建之路 硅基流动高性能低成本的大模型推理云实践 语言模型驱动的软件工具思考:可解释与可溯源 长文本大模型推理实践:以 KVCache 为中心的分离式推理架构 阿里云 AI 搜索 RAG 大模型优