在IE中编辑javascript [英] Edit javascript in IE

查看:59
本文介绍了在IE中编辑javascript的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




有没有人知道编辑直播的方法IE浏览器中的javascript(我没有

控制权)?

例如,我访问网站并在IE浏览器中看到包含
$的网页b $ b Javascript。我可以编辑那个javascript并让IE接受任何更改

我已经完成了吗?


所以我真正说的是,我想通过网站破解javascript服务




Ben

Hi

Does anyone know of a way to edit "live" javascript (that i have no
control over) in IE?

Example, i visit a website and see a webpage in IE containing
Javascript. Can i edit that javascript and get IE to accept any changes
i''ve done to it?

So what i''m saying really, is that i want to hack the javascript served
to me from a website.

Ben

推荐答案

2003年9月20日星期六18:18:27 +0100,bengee

< po ******** @ localhost.localdomain>写道:
On Sat, 20 Sep 2003 18:18:27 +0100, bengee
<po********@localhost.localdomain> wrote:
例如,我访问一个网站,在IE浏览器中看到一个包含
Javascript的网页。我可以编辑那个javascript并让IE接受任何更改
我已经做过了吗?

所以我说的真的是,我想破解所服务的javascript
来自一个网站。
Example, i visit a website and see a webpage in IE containing
Javascript. Can i edit that javascript and get IE to accept any changes
i''ve done to it?

So what i''m saying really, is that i want to hack the javascript served
to me from a website.




是的,很简单的方法,最容易进行简单的更改基础之一

只是使用javascript :yourCode; void 0 - yourCode将在页面上下文中执行

,void 0将停止导航。


吉姆。

-

comp.lang.javascript常见问题 - http://jibbering.com/faq/



yep, loads of easy ways, easiest for simple changes on a one of basis
is just to use javascript:yourCode;void 0 - the yourCode will execute
in the context of the page, and the void 0 will stop navigation.

Jim.
--
comp.lang.javascript FAQ - http://jibbering.com/faq/


Jim Ley写道:
Jim Ley wrote:
是的,很简单的方法,最容易进行简单的更改基于
只是使用javascript :yourCode; void 0 - yourCode将执行
yep, loads of easy ways, easiest for simple changes on a one of basis
is just to use javascript:yourCode;void 0 - the yourCode will execute
in the context of the page, and the void 0 will stop navigation.




我会给出试试看,谢谢。


无论如何要在文本编辑器或类似的代码中编辑实际的代码?


bengee


跟随一个页面生成源的书签(即:

源包括脚本标签和脚本可能的任何内容已经在新窗口中显示了

页面,其中包含

1. textarea,您可以在其中编辑代码

2.一个按钮[套用"用您编辑的版本覆盖页面。

3. a还原将尝试恢复旧页面的按钮。


这个代码(bookmarklet代码应该全部在一行):

javascript :na = open('''',''edit'',''top = 20,width = 650,hei ght =''+(screen.availHeight-

99)+'',目录,菜单栏,可调整大小''); d7c = document .documentElement.innerHTML

; d7o = d7c; while(d7c.indexOf(''<'')> -1)d7c = d7c.replace(''<'',''& lt;''); na.document.w

rite(''< html>< head> ;< title> Sourcedit

''+ document.title +''< / title>< style> body {margin:0px; border:0px; font:m

essagebox;后台:AppWorkspace}输入{font:messa gebox; width:60;} textarea {w

width:100%;}< / style>< script> d7o = opener.d7o; onresize = r; onload = r; f unction

r(){f.ta.style.height = document.body.clientHeight-f.ta.offsetTop-1}< /脚本><

/ head>< body>< form name = f><输入类型=按钮值=应用

onclick =" opener.document.open(); opener.document.wr ite(f.ta.value); opener.doc

ument.close(); opener.focus()">< input type = button value = Restore

onclick =" f.ta.value = d7o; f.ta.焦点()"> Sourcedit< a

href ="''+ location.href +''"> ...''+ location.href.substr ing(location.href.length-4

0)+''< / a> (''+(b = d7o.split(''\ n'')。长度)+''行,

''+ Math.round(d7o.length / b * 10) / 10 +''cpl)< br>< textarea

id = ta>''+ d7c +''< / textarea>< / form>< / body>< / html>''); na.document.close(); na.docum

ent.f.taocus();

关注将提示的小书签一个javascript表达式。对于

示例,如果您知道某个页面使用名为myVar的全局变量,只需在提示符中键入myVar,然后返回当前值。或者,如果你想要更改一个名为myFunc的函数,请输入函数myFunc(){/ * new

code * /},myFunc将在新函数中运行从那时开始。


这是代码:

javascript :function JSexe(){if(valJS!=' 'null''&&

valJS!=''undefined'')strJS = valJS; strJS = prompt(''您的JavaScript代码或

变量:'',strJS); if(strJS!= null&& strJS!=''''&& strJS!=''undefined''){

setTimeout(''valJS = \''\\ \\ '' +的eval(strJS); JSexe() '',10); }

else {valJS =''''; strJS ='''';}} valJS =''''; strJS =''''; JSexe();


HTH

Ivo
www.4umi.com/web/bookmarklet


" bengee" < PO ******** @的localhost.localdomain>在消息中写道

新闻:SG ******************** @ wards.force9.net ...
Follows a bookmarklet that will a page''s generated source (that is: the
source including script tags and anything the script may have contibuted to
the page) in a new window which has
1. a textarea where you can edit the code
2. an button "Apply" that overwrites the page with your edited version.
3. a "Restore" button that will attempt to, eh, restore the old page.

This the code (bookmarklet code should be all on one line):
javascript:na=open('''',''edit'',''top=20,width=650,hei ght=''+(screen.availHeight-
99)+'',directories,menubar,resizable'');d7c=document .documentElement.innerHTML
;d7o=d7c;while(d7c.indexOf(''<'')>-1)d7c=d7c.replace(''<'',''&lt;'');na.document.w
rite(''<html><head><title>Sourcedit
"''+document.title+''"</title><style>body{margin:0px;border:0px;font:m
essagebox;background:AppWorkspace}input{font:messa gebox;width:60;}textarea{w
idth:100%;}</style><script>d7o=opener.d7o;onresize=r;onload=r;f unction
r(){f.ta.style.height=document.body.clientHeight-f.ta.offsetTop-1}</script><
/head><body><form name=f><input type=button value=Apply
onclick="opener.document.open();opener.document.wr ite(f.ta.value);opener.doc
ument.close();opener.focus()"><input type=button value=Restore
onclick="f.ta.value=d7o;f.ta.focus()"> Sourcedit <a
href="''+location.href+''">...''+location.href.substr ing(location.href.length-4
0)+''</a> (''+(b=d7o.split(''\n'').length)+'' lines,
''+Math.round(d7o.length/b*10)/10+'' cpl)<br><textarea
id=ta>''+d7c+''</textarea></form></body></html>'');na.document.close();na.docum
ent.f.ta.focus();
Follows a bookmarklet that will prompt for a javascript expression. For
example if you know a page uses a global variable called "myVar", simply
type myVar in the prompt and the current value will be returned. Or if you
wish to change a function called "myFunc", enter function myFunc(){/* new
code */} and myFunc will behave in the new way from then on.

This is the code:
javascript:function JSexe(){ if (valJS!=''null'' &&
valJS!=''undefined'')strJS=valJS; strJS=prompt(''Your JavaScript code or
variable:'',strJS); if (strJS!=null && strJS!='''' && strJS!=''undefined''){
setTimeout(''valJS=\''\''+eval(strJS);JSexe()'',10); }
else{valJS='''';strJS='''';}}valJS='''';strJS='''';JSexe() ;

HTH
Ivo
www.4umi.com/web/bookmarklet

"bengee" <po********@localhost.localdomain> wrote in message
news:SG********************@wards.force9.net...
Jim Ley写道:
Jim Ley wrote:
是的,很简单的方法,最容易进行基于简单的更改
只是使用javascript :yourCode; void 0 - yourCode将在页面上下文中执行
,void 0将停止导航。
yep, loads of easy ways, easiest for simple changes on a one of basis
is just to use javascript:yourCode;void 0 - the yourCode will execute
in the context of the page, and the void 0 will stop navigation.



我会试一试,谢谢。

无论如何要在文本编辑器或类似编辑器中编辑实际代码?

bengee



I''ll give that a try, thanks.

Anyway''s to edit the actual code in a text editor or similar?

bengee



这篇关于在IE中编辑javascript的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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