我们可以将javascript插入浏览器中加载的任何网页中吗 [英] Can we insert javascript into any webpage loaded in the browser

查看:56
本文介绍了我们可以将javascript插入浏览器中加载的任何网页中吗的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在研究将javascript注入浏览器中加载的任何网页的方法,以便可以遍历该页面的DOM.我将JQUERY用于我的脚本需求.该方法应该在所有浏览器中都可以使用.

I am looking into methods to inject javascript into any webpage loaded in the browser, so that I can traverse through the page's DOM. I use JQUERY for my scripting needs. Method should work in all browsers.

我尝试使用 IFRAME 并向其中添加一些html,但我不能.请提出一些建议.

I tried using IFRAME and adding some html into it, but I cant. Please suggest some ways.

推荐答案

尝试使用Greasemonkey: http://www.greasespot.net/.您可以使用它在页面加载时为所需的任何网站执行自定义脚本.您可以在此处找到一些基本教程: http://wiki.greasespot.net/Tutorials .

Try using Greasemonkey: http://www.greasespot.net/. You can use it to execute custom scripts on page load for any website you want. You can find some basic tutorials here: http://wiki.greasespot.net/Tutorials.

这篇关于我们可以将javascript插入浏览器中加载的任何网页中吗的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆