如何在javascript __doPostBack中找到ActionURL [英] How to find the ActionURL in a javascript __doPostBack
问题描述
我在excel中使用VBA来进行webscrape。我正在尝试下载网站上的链接网址。
I'm using VBA in excel to webscrape. I'm trying to pull down the URLs of links on a website.
在此网站上进行搜索,选中底部附近的任意复选框:( http://www.fpi.co.za/YourFinancialPlanning/FindaFinancialPlanner/tabid /3255/Default.aspx )
Do a search on this website, with any of the checkboxes near the bottom checked:(http://www.fpi.co.za/YourFinancialPlanning/FindaFinancialPlanner/tabid/3255/Default.aspx)
你会看到这里有一个名单(南非的顾问)
You'll see there's a list of names here (advisers in south africa)
如果点击名称,它将带您进入新页面。话虽如此,URL更改的方法实际上是通过javascript __ doPostBack
,这意味着我不能简单地 getelementsbyclassname()。href
If you click on the name it will bring you to a new page. That being said, the method of URL change is actually through javascript __doPostBack
, which means I can't simply getelementsbyclassname().href
我知道我可以简单地使用VBA点击链接,然后存储URL,但有没有办法获取该URL而不导航到它?
I know that I can simply use VBA to click the link, and then store URL, but is there any way of obtaining that URL WITHOUT navigating to it?
这是我正在处理的HREF:
This is the HREF I'm dealing with:
javascript:__doPostBack('dnn$ctr4953$Clients_Custom$ctl00$rg_Members$ctl00$ctl04$lnkName','')
postBackOptions.ActionURL
还有什么?
推荐答案
该网站是一个ASP.Net应用程序。 JavaScript由.Net引擎自动生成,函数 __ doPostBack()
只是将参数发送回服务器,然后重定向到另一页。这意味着URL在服务器上而不是JavaScript中,因此您无法找到它。
The website is an ASP.Net application. The JavaScript is auto-generated by .Net engine, and the function __doPostBack()
is simply posting the arguments back to the server which is then redirecting to the other page. This means that the URL is on the server not in JavaScript, so there is no way for you to find it.
这篇关于如何在javascript __doPostBack中找到ActionURL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!