html表单

HTML表单

好久不见. 提交于 2020-02-01 00:32:06
标签:定义整体的表单区域 action属性:定义表单数据提交地址 method属性:定义表单提交的方式,一般有get方式和post方式 标签:为表单元素定义文字标注 标签:定义通用的表单元素,input标签有type属性 type属性: type=‘text’ 定义单行文本输入框 type=‘password’ 定义密码输入框 type=‘radio’ 定义单选框 type=‘checkbox’ 定义复选框 type=‘file’ 定义上传文件 type=‘submit’ 定义提交按钮 type=‘reset’ 定义重置按钮 type=‘image’ 定义铺面作为提交按钮,哟弄个src属性定义图片地址 type=‘hidden’ 定义一个隐藏的表单域,用来存储值 value属性:定义表单元素的值 name属性:定义表单元素的名称,此名称是提交数据时的键名 标签:定义多行文本输入框 标签:定义下拉表单元素 标签与标签配合:定义下拉表单元素中的选项 来源: CSDN 作者: QT-Sage 链接: https://blog.csdn.net/qq_45330706/article/details/104123675

HTML5初学篇章_3

喜你入骨 提交于 2020-01-29 15:57:49
表单的标签是 <form>, 它使页面与客户的互动成为可能。而它的大部分元素字自 HTML2.0 后就没有再改变过,由此可见这是一个多么具有卓越性的设计。 <form> 标签是用于创建供用户输入的 HTML 表单。它的属性如下: action 规定当提交表单时向何处发送表单数据 method 规定用于发送表单数据的 HTTP 方法。(get:在url地址上面传送参数到服务器,post:在后台传送参数到服务器) name 规定表单的名称。 target 规定在何处打开 action URL。 enctype 规定在向服务器发送表单数据之前如何对其进行编码。(适用于 method="post" 的情况) accept-charset 规定服务器可处理的表单数据字符集。 autocomplete 规定是否启用表单的自动完成功能。 aovalidate 如果使用该属性,则提交表单时不进行验证。 这其中最常用到的属性是 action 、 method 、 name 、 target ,而 autocomplete 、 aovalidate 是 HTML5 新增的属性。原本 <form> 标签还有一个 accept 属性,是用于规定服务器接收到的文件的类型,但是现在 HTML5 已经不支持。 <form> 标签所能包含的表单元素有 <input> 、 <textarea> 、 <button>

Django框架(Python语言)——表单forms

三世轮回 提交于 2020-01-28 03:27:36
在前端网页上添加一个form表单,用于和客户交互,传统方式 效果如下: 传统方式添加表单 第一步 添加路由 在建立的app1的路由文件app1.urls下先加一个路由 划红线是新添加的路由文件,在访问这个路由的前提下我们要调用 app.views.get_name 的函数,在这里我们已经提前将app1的所有路由已经提前加入到全局路由设置下了,如图所示是全局路由urls的文件 同时也罢应用app1加入的全局设置中 如果没有添加的记得一定要添加到全局配置,全局路由中 第二步 定义函数 在上一步中我们调用的是app1下views中的get_name函数,我们开始定义,主要是让网页显示一个form表单 在这里定义的函数名字叫get_name,返回的是一个叫name.html的文件 ,我们要写的便是这个html文件,首先在**工程文件夹(一定要在工程文件夹,否则会找不到))**下(我这里是demo)创建一个templates(模板)文件夹 然后在这个文件夹下建立一个html文件,因为我们刚才返回的那个文件叫name.html,因此这里那个html文件名字就叫name,之后就是写html语言代码 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>登录</title> </head> <body>

HTML表单控件

北城以北 提交于 2020-01-27 08:52:26
input元素无疑是一个庞大和复杂的元素,但它并不是唯一的表单控件。还有button、select、option、label、optgroup、textarea、fieldset、legend这八个传统表单控件,datalist、progress、meter、output、keygen这五个新增表单控件 传统控件 button  定义一个按钮 select   定义一个下拉列表 option  定义下拉列表中的一个选项 optgroup  定义选项组,用于组合选项 textarea  定义多行的文本输入控件 fieldset  分组表单内的相关元素 legend  定义fieldset元素的标题 label   定义input元素的标注 button button元素用来定义一个按钮,button元素内部可以放置文本或图像或其他多媒体内容。但唯一禁止使用的元素是图像映射,因为它对鼠标和键盘敏感的动作会干扰表单按钮的行为 始终为button元素设置type属性,IE7-浏览器的默认类型是button,而其他浏览器的默认类型是submit IE7-提交button元素之间的文本,而其他浏览器则会提交value属性的内容 <button> 元素比 <input> 元素更易样式化。可以添加内联HTML内容(如 <em> , <strong> 甚至 <img> ),并使用:after和

vue中性别表单绑定提交

不羁岁月 提交于 2020-01-23 20:12:48
1 <!DOCTYPE html> 2 <html lang="en"> 3 4 <head> 5 <meta charset="UTF-8"> 6 <meta name="viewport" content="width=\, initial-scale=1.0"> 7 <meta http-equiv="X-UA-Compatible" content="ie=edge"> 8 <title>Document</title> 9 <script src="../vue.js"></script> 10 </head> 11 12 <body> 13 <div id="app"> 14 <form action="http://www.baidu.com" method="get"> 15 <label for="male"> 16 <input type="radio" value="男" name="sex" id="male" v-model="sex">男 17 </label> 18 <label for="female"> 19 <input type="radio" value="女" name="sex" id="female" v-model="sex">女 20 </label> 21 <h2>你选择的是:{{sex}}</h2> 22 <input type

Vue学习笔记之表单输入绑定

自闭症网瘾萝莉.ら 提交于 2020-01-23 01:14:00
表单输入绑定 v-model 值绑定 1 对于单选按钮,复选框及选择框的选项, v-model 绑定的值通常是静态字符串 ( 对于复选框也可以是布尔值 ) : <!-- 当选中时, `picked` 为字符串 "a" --> <input type= "radio" v-model= "picked" value= "a" > <!-- `toggle` 为 true 或 false --> <input type= "checkbox" v-model= "toggle" > <!-- 当选中第一个选项时, `selected` 为字符串 "abc" --> <select v-model= "selected" > <option value= "abc" > ABC </option> </select> 但是有时我们可能想把值绑定到 Vue 实例的一个动态属性上,这时可以用 v-bind 实现,并且这个属性的值可以不是字符串。 2 单选按钮 < input type = "radio" v-model = "pick" v-bind:value = "a" > // 当选中时 vm.pick === vm.a 3 选择框的选项 < select v-model = "selected" > <!-- 内联对象字面量 --> < option v-bind:value = "

SpringSecurity 自定义表单登录

本秂侑毒 提交于 2020-01-22 18:58:23
SpringSecurity 自定义表单登录 本篇主要讲解 在SpringSecurity中 如何 自定义表单登录 , SpringSecurity默认提供了一个表单登录,但是实际项目里肯定无法使用的,本篇就主要讲解如何自定义表单登录  1.创建SpringSecurity项目   1.1 使用IDEA   先通过IDEA 创建一个SpringBoot项目 并且依赖SpringSecurity,Web依赖   此时pom.xml会自动添加 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-security</artifactId> </dependency>  2.扩展 WebSecurityConfigurerAdapter  WebSecurityConfigurerAdapter 是SpringSecurity 提供的用于我们扩展自己的配置  实现WebSecurityConfigurerAdapter经常需要重写的: 1、configure(AuthenticationManagerBuilder auth); 2、configure(WebSecurity web); 3、configure(HttpSecurity http);   2.1

html - 表单

不羁的心 提交于 2020-01-22 13:19:37
html - 表单 一、input 二、textarea(多行文本框) 三、select option(下拉菜单) 四、lable (辅助) 一、input 常见的input类型: text 单行文本框 password 密码 radio name属性一般和radio一起使用,表示一组的单选框name值相同 checkbox 后面再+checkbox表示默认选项、再+disabled表示禁止选线 file 后+multipluy 表示多选,表示可同时上传多份文件 submit 提交到form的action属性内容表示的地址中区 reset 初始化form表单 < body > < form action = "http:www.baidu.com" > 输入框: < input type = "text" placeholder = "请输入" > < br > placeholder表示提示文字 密码框: < input type = "password" > < br > 单选框: < input type = "radio" name = "gender" > 男 < input type = "radio" name = "gender" > 女 < br > 注意:name值相等的确定为一组单选组 复选框: < input type = "checkbox"

HTML 表单练习

会有一股神秘感。 提交于 2020-01-22 11:03:09
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <title>from表单练习</title> </head> <body> <form action="##"> 用户名:<input type="text"> <br> 密码框:<input type="text"> <br> <label for=""> 性别: <input type="radio" name="nihao"> 男 </label> <label for=""> <input type="radio" name="nihao"> 女 <!-- name别名只能选一个 --> </label> <br> <label for=""> <input type="checkbox">唱歌 </label> <label for=""> <input type="checkbox">跳舞 </label> <label for=""> <input type="checkbox">篮球 <

HTML表单制作

假如想象 提交于 2020-01-21 08:17:26
使用html制作表单 这是做出来的效果图 登录框的制作需要使用文本域、下拉框、单选框等。 可以加入适当元素,如:地区,爱好,性别等元素。(这里我只添加了一个地区元素)。 代码如下: < html > < body > < form action = "" method = "GET" > 用户名: < input type = "text" name = "用户名" > < br > 密码: < input type = "password" name = "密码" > < br > 城市: < select name = "city" > < option value = "yu" > 河南 < / option > < option value = "bj" > 北京 < / option > < option value = "sx" > 山西 < / option > < option value = "tj" > 天津 < / option > < option value = "sz" > 深圳 < / option > < / select > < br > < input type = "submit" > < / form > < / body > < / html > 这样便制作出一个简洁的登陆框。 来源: CSDN 作者: 捷。 链接: https:/