Command "window.location.href" Not Working On HTML (Bootstrap Framework)
I'm currently working on a university project in which I need to create a simple login screen which redirects the user to another landing page. As I'm new to web programming, I sea
Solution 1:
window.location.href
is a property not a function. Assign the value as an absolute path instead.
window.location.href = '/form.html';
There is also a function style way of doing this which you might be confusing it with:
window.location.assign("form.html");
Solution 2:
It is not a function. Do this instead:
window.location.href = 'form.html';
Additionally, turn on your browser's debug console to see any JavaScript errors. In Chrome it will say "Uncaught TypeError: window.location.href is not a function(…)"
Solution 3:
Try also this
window.location = "form.html";
Post a Comment for "Command "window.location.href" Not Working On HTML (Bootstrap Framework)"