I have created 2 static html pages locally, demo1.html
and demo2.html
.
I need to redirect from one page to another pag. Initially I opened my demo1.html
page (url is file:///D:/app/demo1.html).
Now on clicking a button in this page I want to redirect to demo2.html
I tried:
$( "#submit" ).click(function() {
window.location.href = "/demo2.html";
});
but it did not work. What changes I need to make it to work?