Web Technology
Accenture PrimermediumWeb TechnologyJavascript

Ram's banking website has a 'Check Interest Rates' button that should redirect users to a separate page. Which JavaScript code accomplishes this?

Answer options

A
location.href = "url"
B
url.newlocation
C
window.redirect("url")
D
document.location("url")

Correct answer: location.href = "url"

Explanation

window.location.href (or location.href) is the standard JavaScript property used to redirect the browser to a different URL.

Related Accenture Web Technology questions

Practice more Accenture Web Technology questions

PrimerDumps has 1400+ primer questions, 2026 mocks and coding hands-on — all free.