阅读:1490回复:1
请问greasemonkey如何取得js文件的变量或对象的值啊?
例如有一个页面加载一个JS
<html> <head> <script src="js/abc.js" type="text/javascript"></script> </head> 请问greasemonkey何取得abc.js文件里面的变量或对象的值啊? 使用window.a不行。document.a也不行。undefine啊 |
|
1楼#
发布于:2015-09-23 15:54
现在的程序员都不看文档了么?
http://wiki.greasespot.net/UnsafeWindow http://wiki.greasespot.net/Category:Coding_Tips:Interacting_With_The_Page 非global的变量可以尝试用函数劫持来获取 |
|