我的用户名输入重定向到关于页面

时间:2013-12-11 15:29:43

标签: html

    <?php

?>

<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="css/global.css">
<link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Lusitana"
</head>

<body>
        <div id="header">
                <h1>Lorem ipsum dolor sit amet.</h1>
                <a href = "index.php"</href><h2>Home</h2>
                <a href = "news.php"</href><h2>News</h2>
                <a href = "login.php"</href><h2>Login</h2>
                <a href = "about.php"</href><h2>About</h2>
        </div>
        <div id="login">
        <label for="username">Type the username:</label>
        <input type = "text" name="username" id="username"/>

        </div>
</body>
</html>

当我点击用于输入用户名的输入时,我会被重定向到我网站的其他页面 (about.php)

任何人都可以解释为什么会发生这种情况并提供如何修复的说明吗?

编辑:一切都重定向到about.php减去标题中的其他链接

1 个答案:

答案 0 :(得分:0)

 <a href = "index.php"</href><h2>Home</h2>

应该是

 <a href = "index.php"><h2>Home</h2></a>

错误地关闭锚标记

链接未关闭

<link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Lusitana"

<a href = "index.php"><h2>Home</h2></a>
<a href = "news.php"><h2>News</h2></a>
<a href = "login.php"><h2>Login</h2></a>
<a href = "about.php"><h2>About</h2></a>