How to get complete current page url with javascript?



How to get complete current page url with javascript?..

Answer / Pratik Kumar

You can use the window.location object in JavaScript to get the current URL. Here's an example:nnlet url = window.location.href;

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More JavaScript Interview Questions

Explain why "self" is needed instead of "this".

1 Answers  


How to set the cursor to wait in JavaScript?

1 Answers  


How to add/remove properties to object dynamically in javascript?

1 Answers  


What is a Typed Language?

1 Answers  


Is JavaScript a true OOP language?

1 Answers  


How to find the selected radio button immediately using the 'this' variable?

1 Answers  


Does javascript support automatic type conversion, if yes give example.

1 Answers  


what is the extension of java script.

2 Answers  


How to make elements invisible?

1 Answers  


What are JavaScript types?

11 Answers   Infosys, Satyam,


Where do I put javascript code in html?

1 Answers  


What is the use of Void(0)?

1 Answers  


Categories