How to redirect to a new page using jQuery.
I am write the code for login page go to redirect another page using JQuery scripts first add and refer jquery scripts and write my code then after execute you will got a outputs.I am write the code to design all content to the jquery function with below codes.
How to redirect to a new page using jQuery.
Below jQuery code can be used to redirect to a new page.
In this article I am using one button. When you click on this button page will be redirect to a new page. This is a simple code and it will be usefull especially in your login page.
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<script language ="javascript" src ="script/jquery-1.2.6.min.js"></script>
<script language ="javascript" src="script/jquery-latest.js"></script>
</head>
<script>
$(document).ready(function() {
$("#Cmd_Load1").click(function() {
var test = "<table><tr><td>Name:</td><td><input type ='text'/></td></tr><tr><td>Password:</td><td><input type ='text'/></td></tr><tr><td>Click Here-></td><td><a href='Home.aspx' id='Click1'>Submit</a></td></tr></table>";
document.write(test);
});
});
</script>
<body>
<input type ="button" name ="Click" value ="Login" id="Cmd_Load1" />
<form id="form1" runat="server">
</form>
</body>
</html>