Firefox 在展示前更改页面
我正在开发一个mozilla插件,我想知道如何在发送响应之前更改ajax请求的页面 假设在stackoverflow中有一个按钮,当我单击调用此函数时:Firefox 在展示前更改页面,firefox,firefox-addon,Firefox,Firefox Addon,我正在开发一个mozilla插件,我想知道如何在发送响应之前更改ajax请求的页面 假设在stackoverflow中有一个按钮,当我单击调用此函数时: h = new XMLHttpRequest(); h.open("GET", "somepage",true); h.onreadystatechange=function() { if (h.readyState==4) { alert(h.responseText); //I want change this result
h = new XMLHttpRequest();
h.open("GET", "somepage",true);
h.onreadystatechange=function() {
if (h.readyState==4) {
alert(h.responseText); //I want change this result before the javacript alert the content...
}
}
h.send(null)
我希望你能理解我的问题。。。
a想要更改的站点都使用ajax,我没有找到其他方法来更改内容而不更改ajax中的响应
谢谢:在浏览器解释之前,您需要为该事件创建响应,然后修改响应