1

I have tried to put the name of the HTML file in a tag and take the href value using the id of it, but it does not work. I need to take the current HTML file name using JavaScript or jQuery.

document.getElementById("currentHTML").getAttribute("href"); //returns: Cannot read property 'getAttribute' of null
Programmer2B
  • 552
  • 3
  • 14

0 Answers0