0

I want to catch this 'id' on "update.html" file in variable which I could use. I am using "electron".

a.href = "user.js?id ="+ element.id;
Barmar
  • 741,623
  • 53
  • 500
  • 612
Sharjeel shahid
  • 202
  • 1
  • 2
  • 11

1 Answers1

0
<script>
    function getparams(url) {
        var queryString = url ? url.split('?')[1] : window.location.search.slice(1);
        var id = queryString.split('=')[1];
    }
    getparams();
</script>
M. Prokhorov
  • 3,894
  • 25
  • 39
Sharjeel shahid
  • 202
  • 1
  • 2
  • 11