| |

VerySource

 Forgot password?
 Register
Search
Author: ydnh2222

How to get javascript link

[Copy link]

0

Threads

2

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-8-15 16:45:01
| Show all posts
<html>
<body>
<script>
function link(){
    open("http://www.baidu.com");
}
function link2(str){
    open(str);
}
</script>
<a href="javascript:link()">baidu</a>
<a href="javascript:link2('http://www.baidu.com')">baidu</a>
</body>
</html>

js can be opened in n kinds of implementations, you can pass parameters or not, or you can do all kinds of things~~
It is impossible to achieve 100% correct machine analysis.

The general method of downloading software is to monitor the browser. It is a bit difficult to realize batch grabbing and automatic downloading~~~
If it's just the js of a specific website, you can also write a program after human flesh analysis~~~
Reply

Use magic Report

1

Threads

9

Posts

8.00

Credits

Newbie

Rank: 1

Credits
8.00

 China

 Author| Post time: 2020-8-15 17:15:01
| Show all posts
This brother may not understand what I mean.I want to nest webbrowse controls in winform. Now I can get the js function and the path of the js file of the server. I want to execute the corresponding js function based on these two.
For example, the js function of NetEase homepage is from
<script type="text/javascript" src="http://cimg2.163.com/cnews/163/img6/ajaxtabs.js"></script> get,
Now get a link:
<a href="javascript:showLocSelect();" target="_self">Customize local news</a>

Can I get the link to "customize local news" based on this function?
Reply

Use magic Report

0

Threads

2

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-8-15 17:30:02
| Show all posts
http://cimg2.163.com/cnews/163/img6/ajaxtabs.js there is no one
showLocSelect() method
Reply

Use magic Report

1

Threads

9

Posts

8.00

Credits

Newbie

Rank: 1

Credits
8.00

 China

 Author| Post time: 2020-8-15 17:45:01
| Show all posts
What if there is any?
Reply

Use magic Report

0

Threads

3

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-8-15 18:15:02
| Show all posts
I think it's still more difficult. Download tools like Xunlei can only detect whether there is a download address in the memory when facing JavaScript code.
Reply

Use magic Report

1

Threads

9

Posts

8.00

Credits

Newbie

Rank: 1

Credits
8.00

 China

 Author| Post time: 2020-8-16 00:00:01
| Show all posts
anyone knows?
Reply

Use magic Report

0

Threads

8

Posts

8.00

Credits

Newbie

Rank: 1

Credits
8.00

 China

Post time: 2020-8-26 11:15:01
| Show all posts
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace test
{
    public partial class Form1: Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            this.webBrowser1.Navigate("http://www.sohu.com");
        }

        private void webBrowser1_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
        {
            System.Windows.Forms.HtmlElementCollection htmls = this.webBrowser1.Document.GetElementsByTagName("a");
            foreach (System.Windows.Forms.HtmlElement he in htmls)
            {
                string str = he.GetAttribute("href");
                MessageBox.Show(str);
            }
        }
    }
}
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list