-2

I currently set this link

<a target="_blank" href="http://alceawisteria.byethost7.com/PHP/0demo/2023-03-25-BoxNet/rolling.php#download?i=1"><font size="+9">(↓)</font></a>

However there are times when the "#download part is simply removed, why ?

1 Answers1

1

However there are times when the "#download part is simply removed, why ?

If you inspect the element of the HTML, you can find this:

...
<script type="text/javascript">
  if (location.href.indexOf("#download") != -1) {
    //alert("Hello! I am an alert box!!");
    document.getElementById('linky').click()

  }
</script>
...

That script runs: if #download exists, button #linky will be clicked.

...
<a id="linky"
  onclick="this.href='data:text/html;charset=UTF-8,'+encodeURIComponent(document.documentElement.outerHTML)"
  href="#" download="rollingyourpage.html" style="color:transparent">
  <font size="+5">Download</font>
</a>
...

When button #linky is clicked, page will redirect to base64 link format with String document.documentElement.outerHTML. Hope that helps.

Jordy
  • 1,802
  • 2
  • 6
  • 25