极客学院的前端课程(七)

2.11.3 address元素和网页编排规则



<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title></title>
</head>
<body>
    <address>
        <a href="#">iwen</a>
        <a href="#">ime</a>
    </address>
    <footer>
        <div>
            <address>
                <a href="#">iwen</a>
                极客学院,嘉华大厦
            </address>
            <time datetime="2018-07-04">2018-07-04</time>
        </div>
    </footer>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>网页编排实例</title>
</head>
<body>
    <header>
        <h1>网页标题</h1>
        <nav>
            <ul>
                <li><a href="#">首页</a></li>
                <li><a href="#">帮助</a></li>
            </ul>
        </nav>
    </header>
    <article>
        <hgroup>
            <h1>文章主标题</h1>
            <h2>文章子标题</h2>
        </hgroup>
        <p>文章正文</p>
        <section>
            <div>
                <article>
                    <h1>评论标题</h1>
                    <p>评论正文</p>
                </article>
            </div>
        </section>
    </article>
    <footer>
        <small>版权所有:.....</small>
    </footer>
</body>
</html>
2.12.1 form属性与formaction属性


<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <form id="testform">
        <input type="text">
    </form>
        <textarea form="testform"></textarea>

</body>
</html>

2.12.2 formmethod属性与formenctype属性


<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <form id="testform">
        <input type="submit" name="s1" value="v1" formmethod="post" formaction="xx.jsp">提交
        <input type="submit" name="s2" value="v2" formmethod="get" formaction="xx.jsp">提交
    </form>
</body>
</html>

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <form>
        <input type="text" formenctype="text/plain"> <!--将空格转换为 "+" 符号,但不编码特殊字符。-->
        <input type="text" formenctype="multipart/form-data"> <!--不对字符编码。当使用有文件上传控件的表单时,该值是必需的。-->
        <input type="text" formenctype="application/x-www-form-urlencoded"> <!--在发送前对所有字符进行编码(默认)。-->
    </form>
</body>
</html>

2.12.3 formtarget属性与autofocus属性



<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <form>
        <input type="text" autofocus>
        <input type="text">
    </form>
</body>
</html>

2.12.3 required属性与labels属性


猜你喜欢

转载自blog.csdn.net/garrulousabyss/article/details/80910721