I am trying to use WebBrowser control to click a button that doesn't have any anchor text or anything
我试图使用WebBrowser控件来单击没有任何锚文本或任何东西的按钮
I looked at the source and saw this.
我看了看源头,看到了这个。
var _tm7 = new TabMenu( 'TempoTabMenuControl', 'TempoTabMenuControlRow', ['Add Edit'], 0); _tm7.Add(new TabMenuItem('View Menu', '/Edit/NewUI.html?tstudio=45', 'main'), true); _tm7.Add(new TabMenuItem('Property List', '/Edit/Scripts/PrpList.asp', 'display'), false); _tm7.Add(new TabMenuItem('New Listing', '/Edit/Scripts/NewList.asp', 'display'), false);
var _tm7 = new TabMenu('TempoTabMenuControl','TempoTabMenuControlRow',['Add Edit'],0); _tm7.Add(new TabMenuItem('View Menu','/ Edit / NewUUI.html?tstudio = 45','main'),true); _tm7.Add(new TabMenuItem('Property List','/ Edit / Scripts / PopList.asp','display'),false); _tm7.Add(new TabMenuItem('New Listing','/ Edit / Scripts / NewList.asp','display'),false);
I guess its script to populate the fields of the dropdown menu. I want to get to "/Edit/Scripts/NewList.asp" but I have to do it with the javascript because the NewList.asp is only configured to work from within a frame with the main page as the parent.
我想它的脚本填充下拉菜单的字段。我想转到“/Edit/Scripts/NewList.asp”,但我必须使用javascript,因为NewList.asp仅配置为在主页面作为父页面的框架内工作。
The Javascript file they use is here:
他们使用的Javascript文件位于:
Is there some way to activate some kind of evil javascript method or something from the WebBrowser control?
有没有办法从WebBrowser控件激活某种邪恶的JavaScript方法或什么?
Javascript Gurus Please HelP!!
Javascript Gurus Please HelP !!
1 个解决方案
#1
Most Web browsers have some sort of console that can be used to execute arbitrary JavaScript. Most also support an arguably faster method of executing JavaScript: placing javascript:[insert code here];void(0);
in the URL bar.
大多数Web浏览器都有某种可用于执行任意JavaScript的控制台。大多数人还支持一种可以说更快的执行JavaScript的方法:放置javascript:[在此处插入代码]; void(0);在URL栏中。
I'm guessing by "WebBrowser control", you mean a program with an embedded web browser, as opposed to a real web browser. The "javascript:
in URL bar" method may still work, or if not, you could try browsing to the website in a real web browser and using its JavaScript console. Otherwise, you're pretty much out of luck unless you do something fancy involving a proxy.
我猜测“WebBrowser控件”,你的意思是一个带有嵌入式Web浏览器的程序,而不是真正的Web浏览器。 “javascript:in URL bar”方法可能仍然有效,如果没有,您可以尝试在真实的Web浏览器中浏览网站并使用其JavaScript控制台。否则,除非你做一些涉及代理的奇特事情,否则你几乎没有运气。
#1
Most Web browsers have some sort of console that can be used to execute arbitrary JavaScript. Most also support an arguably faster method of executing JavaScript: placing javascript:[insert code here];void(0);
in the URL bar.
大多数Web浏览器都有某种可用于执行任意JavaScript的控制台。大多数人还支持一种可以说更快的执行JavaScript的方法:放置javascript:[在此处插入代码]; void(0);在URL栏中。
I'm guessing by "WebBrowser control", you mean a program with an embedded web browser, as opposed to a real web browser. The "javascript:
in URL bar" method may still work, or if not, you could try browsing to the website in a real web browser and using its JavaScript console. Otherwise, you're pretty much out of luck unless you do something fancy involving a proxy.
我猜测“WebBrowser控件”,你的意思是一个带有嵌入式Web浏览器的程序,而不是真正的Web浏览器。 “javascript:in URL bar”方法可能仍然有效,如果没有,您可以尝试在真实的Web浏览器中浏览网站并使用其JavaScript控制台。否则,除非你做一些涉及代理的奇特事情,否则你几乎没有运气。