04:标签之input系列+其他常用标签

input标签常用的类型属性(name=key,values=值,提交到后端。)

        <input type="text">         # 文本
        <input type="password">     # 密码
        <input type="button">       # 按钮
        <input type="submit">       # 提交
        <input type="radio">        # 单选,根据name,values值做判断,以字典返回。checked="checked"是默认值选项
        <input type="checkbox">     # 多选,name相同,以列表返回。checked="checked"是默认值选项

        <input type="file">         # 上传文件,必须依赖form表单的一个属性enctype="multipart/form-data"
        <input type="reset" value="重置">

 

textarea文本标签

       <textarea name="text">中间写默认值</textarea>   # 多行文本

 

select标签

        <select name="city" size="2" multiple="multiple">
            <option value="北京">北京</option>
            <option value="上海">上海</option>
            <option value="深圳">深圳</option>
        </select>

 

img标签

<img src="1.jpg" style="height: 200px;width: 200px" title="鼠标放上去的文字显示" alt="图片不显示的描述">

 

label标签

        <label for="username">用户</label>
        <input id="username" type="text">

 

a标签

 

 

 

 

 

 

【完】

posted on 2020-04-13 19:07  yeyu1314  阅读(229)  评论(0编辑  收藏  举报