I have a file (it is not txt) and I want to open this file without the user clicking

1

I am a beginner and I have doubts. Here is an example of how I want it to be:

<!DOCTYPE html>
<html>
<head>
</head>
<body>
   <!-- Como fazer esse link abrir sem necessidade do usuário clicar?-->
    <a href="launch.jnlp">Clique</a>

</body>

    
asked by anonymous 01.06.2016 / 16:08

1 answer

3

If you want to open the link in a new tab, even though you are a beginner, you can choose JavaScript , here is a practical example:

function OpenInNewTab(url) {
var win = window.open(url, '_blank');
win.focus();
}

In the HTML code we will only place:

<body onload=OpenInNewtab('http.....')>
.......
</body>
    
01.06.2016 / 16:16