javascript 如何将html登录页面链接到另一个页面
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/30572071/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to link html login page to another
提问by Thennarasu
I have created simple login page using html. i want create link with another page after click login page.here attach my code i set its not working .how to link another page after login ..here My code
我使用 html 创建了简单的登录页面。我想在点击登录页面后创建与另一个页面的链接。这里附上我的代码我设置它不起作用。如何在登录后链接另一个页面..这里我的代码
<!DOCTYPE html>
<html >
<head>
<meta charset="UTF-8">
<title>Login Form</title>
<link rel="stylesheet" href="css/style.css">
</head>
<body>
<IMG class="displayed" src="images/wel..png" alt="...">
<div id="login">
<div id="triangle"></div>
<h1>Log in</h1>
<form>
<input type="Username" placeholder="Username" />
<input type="password" placeholder="Password" />
<input type="submit" value="Log in" />
</form>
</div>
<script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>
<script src="js/index.js"></script>
</body>
</html>
回答by Radonirina Maminiaina
Are you looking for action attribute of form? Try this:
您在寻找表单的 action 属性吗?试试这个:
<form action="http://www.example.com" method="post">
<input type="Username" placeholder="Username" />
<input type="password" placeholder="Password" />
<input type="submit" value="Log in" />
</form>
回答by priya786
you have to change
你必须改变
<form action="youpagename">
回答by Haresh Shyara
Try to following:
尝试以下:
<form method="GET" action="foo.html">
<input type="submit" value="Login"/>
</form>
This is the same, but valid, and is equivalent to:
这是相同的,但有效的,相当于:
<a href="foo.html">