how can i open local file with a variable link in HTML JS

Viewed 55

I have xxx(1).xml ,xxx(2).xml ,xxx(3).xml files. I'm trying to open these files in js function. I used this code

href="xxx.xml"

in html but it only works for one local file. And I also tried in javascript

window.open(path,"_self")

but this isn't working like I want. is there any methods for this ?

1 Answers

You can not open local files in the browser through javascript. since it causes security issues.

Related