Jump to content

Link

Go to solution Solved by Hans Christian | Teri,
6 minutes ago, aeliasov9 said:

I don't run the website How do i do it?

I mean, you can't (persistently) alter a website if you don't have access to do so.

 

Here's how to do it with Javascript. Beware that browsers will usually block this behaviour, unless you specifically allow a page to open multiple windows / tabs.

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <button onclick="test()">Open multiple links</button>
</body>

<script>
    function test() {
        window.open("https://www.google.com", "_blank");
        window.open("https://www.linustechtips.com", "_blank");
    }
</script>
</html>

 

6 minutes ago, aeliasov9 said:

I don't run the website How do i do it?

I mean, you can't (persistently) alter a website if you don't have access to do so.

 

Here's how to do it with Javascript. Beware that browsers will usually block this behaviour, unless you specifically allow a page to open multiple windows / tabs.

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <button onclick="test()">Open multiple links</button>
</body>

<script>
    function test() {
        window.open("https://www.google.com", "_blank");
        window.open("https://www.linustechtips.com", "_blank");
    }
</script>
</html>

 

Link to comment
https://linustechtips.com/topic/1301926-link/#findComment-14452267
Share on other sites

Link to post
Share on other sites

2 minutes ago, Hans Christian | Teri said:

I mean, you can't alter a website if you don't have access to do so.

 

Here's how to do it with Javascript. Beware that browsers will usually block this behaviour, unless you specifically allow a page to open multiple windows / tabs.


<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <button onclick="test()">Open multiple links</button>
</body>

<script>
    function test() {
        window.open("https://www.google.com", "_blank");
        window.open("https://www.linustechtips.com", "_blank");
    }
</script>
</html>

 

Do you know anywhere where i can store the code online for free?

Link to comment
https://linustechtips.com/topic/1301926-link/#findComment-14452271
Share on other sites

Link to post
Share on other sites

Just now, Ankh Tech said:

I wouldn't suggest doing the above unless you have good knowledge of web proggraming, you don't copy this in, you take parts of it and replace parts in the website code. But why are you doing this exactly

I hope it was quite obvious that the snippet is very much only an example. 🙃

Link to comment
https://linustechtips.com/topic/1301926-link/#findComment-14452284
Share on other sites

Link to post
Share on other sites

4 minutes ago, aeliasov9 said:

I am doing photography gcses and i need one link to open multiple photos.

Why do you need it to be online? It's a lot easier to help you if you are way more specific. Where are your images hosted, who needs to click this link?

Link to comment
https://linustechtips.com/topic/1301926-link/#findComment-14452306
Share on other sites

Link to post
Share on other sites

1 minute ago, Hans Christian | Teri said:

Why do you need it to be online? It's a lot easier to help you if you are way more specific. Where are your images hosted, who needs to click this link?

Me and my teacher, it links to the photographers website thats why it needs to be hosted on the web rather than my computer.

Link to comment
https://linustechtips.com/topic/1301926-link/#findComment-14452311
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×