File path not working in | Sololearn: Learn to code for FREE!


File path not working in

I have a file path which when I use in href attribute of anchor tag, it is working but when I use in, it is not working can anyone give solution. It is urgent!!!

1/21/2022 3:46:27 AM


3 Answers

New Answer


Just doing this should work -, '_blank').focus();


// init urls let newUrl = ''; let currentUrl = window.location.href; // open window with url of current page, you will be automatically moved // by browser to a new opened tab. It will look like your page is reloaded // and you will stay on same page but with new page opened , '_blank'); // on your current tab will be opened new url location.href = newUrl;


Ankita Kumari If the url is then, can you give me example ?