firemail
标题:
开发
[打印本页]
作者:
firemail
时间:
2017-5-10 18:27
标题:
开发
安装扩展
DOM Inspector
Element Inspector 使用 shift + 右键,在 DOM Inspector 中查找并定位到相应的元素节点
https://addons.mozilla.org/en-US/firefox/
作者:
firemail
时间:
2017-5-11 10:24
本帖最后由 firemail 于 2017-5-11 11:44 编辑
在线源码
https://dxr.mozilla.org/comm-central/
mxr.mozilla.org常用方法
1.切换到comm-central分支
2.常用查询方法
参考 operators下载菜单选项
a.查询实现downloadAllForOffline函数的 idl文件和cpp文件
downloadAllForOffline ext:idl ext:cpp
作者:
firemail
时间:
2017-5-11 11:46
在线帮助 MDN
https://developer.mozilla.org/en-US/
相关模块关键字
网络 : xmlhttprequest
作者:
firemail
时间:
2017-5-11 14:41
本帖最后由 firemail 于 2017-5-12 12:20 编辑
网络请求
//var oReq = Cc["@mozilla.org/xmlextras/xmlhttprequest;1"].
// createInstance(Ci.nsISupports);
/////////get/////
var oReq = new XMLHttpRequest();
oReq.open("GET", "http://127.0.0.1:8080/zmkj/f/zm/api/putData");
oReq.addEventListener("error", function(event) { alert(event); } ,false);
oReq.onload = function(event) {
alert(event)
// var retbuffer = oReq.response;// not responseText
// alert(retbuffer)
var buffer = oReq.responseText;
alert(buffer)
}
oReq.send();
复制代码
post方法
Submitting forms and uploading files
Instances of XMLHttpRequest can be used to submit forms in two ways:
using only AJAX
using the FormData API
https://developer.mozilla.org/en ... sing_XMLHttpRequest
https://developer.mozilla.org/en ... ng_FormData_Objects
var formData = new FormData();
formData.append("username", "testUser");
var request = new XMLHttpRequest();
request.open("POST", "http://127.0.0.1:8080/zm/f/zm/api/postData");
request.onload = function(oEvent) {
alert(request.status + request.responseText)
};
request.send(formData);
复制代码
欢迎光临 firemail (http://firemail.wang:8088/)
Powered by Discuz! X3