This article brings you knowledge about forms in HTML (code examples). It has certain reference value. Friends in need can refer to it. I hope it will be helpful to you.
Open the link in a new browser window
<a href="目标网址" target="_blank">新的浏览器窗口打开</a>
mailto
mailto Email address, the browser will automatically call the default client email program (such as OutLock), and automatically fill in the recipient's address in the recipient box.
cc= Cc address, use cc=address after the recipient address, you can fill in the Cc address.
bcc= For blind carbon copy address, use bcc=address after the recipient address. You can fill in the blind carbon copy address
; Multiple recipients, CC, BCC, separate the addresses of multiple recipients with semicolons, you can send to multiple recipients
subject= Email subject, use subject= to add the email subject
body Email content, use body= to add the content of the email
If there are multiple parameters after mailto, the first A parameter must start with "?", and each subsequent parameter must be separated by "&".
<a href="mailto:123456@qq.com">发送</a> <a href="mailto:123456@qq.com?cc=123456@qq.com">发送</a> <a href="mainto:123456@qq.com?bcc=654321@qq.com">发送</a> <a href="mailto:123456@qq.com;654321@qq.com">发送</a> <a href="mailto:123456@qq.com?subject=发送电子邮件">发送</a> <a href="mailto:123456@qq.com?body=欢迎来到HTML代码世界">发送</a>
form
Use HTML form (form) to interact with users. The form can transmit the data entered by the browser to the server, so that the server-side program can process the data passed by the form.
:
endsaction : Where the data entered by the browser is transmitted
method: The method of data transmission (get/post)
Note: All form controls (text boxes, text fields, buttons, radio boxes, check boxes, etc.) must be placed between the
tags (otherwise the information entered by the user may not be submitted to the server)<form method="传送方式" action="服务器文件"> <form method="post" action="save.php"> <label for = "username">用户名:</label> <input type = "text" name="username" /> <input for = "pass">密码:</label> <input type = "password" name="pass">
The label label in the form form
The label label is used to improve usability for mouse users. This control will be triggered if the text is clicked within the label label. That is to say, when the user clicks to select the label, the browser will automatically turn the focus to the form control related to the label (the form control associated with the label will be automatically selected).
Note: The value in the for attribute of the label must be the same as the value of the id attribute of the control.
<label for="控件id名称">
Text input box, password input box
The text input box is used when the user wants to type letters, numbers, etc. in the form. . The text box can also be converted into a password input box.
type: When type="text", the input box is a text input box; when type="password", the input box is a password input box.
name: Name the text box for use by the background program ASP and PHP
value: Set the default value for the text input box. (Generally used as a prompt)
<form> 姓名: <input type = "text" name="myName"> <br/> 密码: <input type = "password" name="pass"> </form>
Text field
When the user needs to enter a large section of text in the form, text needs to be used Enter the domain.
Tags appear in pairs, ends;
cols: The number of columns in the multi-line input field;
rows: The number of rows in the multi-line input field;
在标签之间可以输入默认值。注意cols和rows这两个属性可用CSS样式的width和height来代替:col用width、row用height来代替。
<form method = "post" action="save.php"> <label>联系我们</label> <textarea cols="50" rows="10">在这里输入内容。。。</textarea> </form>
单选框、复选框
在HTML中有两种选择框,单选框和复选框,两者的区别是单选框中的选项用户只能选择一项;复选框中用户可以任意选择多项甚至全选。
type:当type="radio"时为单选框,type="checkbox"时为复选框
value:提交数据到服务器的值
name:为控件命名
checked:当设置checked="checked"时,该选项被默认选中
注意:同一组单选按钮,name取值一定要一致,这样同一组的单选按钮才可以起到单选的用作。
下拉列表框
<option value='提交值'>选项</option>
下拉列表在网页中也常会用到,它可以有效的节省网页空间。既可以单选、又可以多选。
value='提交值'——>向服务器提交的值;选项——>显示的值
selected="selected"属性,则该选项就被默认选中。
下拉列表可以进行多选操作,在
提交按钮和重置按钮
表单中有两种按钮可以使用,分别是提交按钮,重置按钮。
提交按钮:
type:只有当type值设置为submit时,按钮才有提交作用
value:按钮上显示的文字
重置按钮:
type:只有当type值设置为reset时,按钮才有重置作用
value:按钮上显示的文字
<input type="submit" value="提交"> <input type="reset" value="重置">
相关推荐:
HTML ------ 关于表单 Form - Tina_xy
The above is the detailed content of Explanation of knowledge related to forms in HTML (code examples). For more information, please follow other related articles on the PHP Chinese website!

译者 | 李睿审校 | 孙淑娟Web Speech API是一种Web技术,允许用户将语音数据合并到应用程序中。它可以通过浏览器将语音转换为文本,反之亦然。Web Speech API于2012年由W3C社区引入。而在十年之后,这个API仍在开发中,这是因为浏览器兼容性有限。该API既支持短时输入片段,例如一个口头命令,也支持长时连续的输入。广泛的听写能力使它非常适合与Applause应用程序集成,而简短的输入很适合语言翻译。语音识别对可访问性产生了巨大的影响。残疾用户可以使用语音更轻松地浏览

docker部署javaweb系统1.在root目录下创建一个路径test/appmkdirtest&&cdtest&&mkdirapp&&cdapp2.将apache-tomcat-7.0.29.tar.gz及jdk-7u25-linux-x64.tar.gz拷贝到app目录下3.解压两个tar.gz文件tar-zxvfapache-tomcat-7.0.29.tar.gztar-zxvfjdk-7u25-linux-x64.tar.gz4.对解

web端指的是电脑端的网页版。在网页设计中我们称web为网页,它表现为三种形式,分别是超文本(hypertext)、超媒体(hypermedia)和超文本传输协议(HTTP)。

区别:1、前端指的是用户可见的界面,后端是指用户看不见的东西,考虑的是底层业务逻辑的实现,平台的稳定性与性能等。2、前端开发用到的技术包括html5、css3、js、jquery、Bootstrap、Node.js、Vue等;而后端开发用到的是java、php、Http协议等服务器技术。3、从应用范围来看,前端开发不仅被常人所知,且应用场景也要比后端广泛的太多太多。

web前端打包工具有:1、Webpack,是一个模块化管理工具和打包工具可以将不同模块的文件打包整合在一起,并且保证它们之间的引用正确,执行有序;2、Grunt,一个前端打包构建工具;3、Gulp,用代码方式来写打包脚本;4、Rollup,ES6模块化打包工具;5、Parcel,一款速度极快、零配置的web应用程序打包器;6、equireJS,是一个JS文件和模块加载器。

怎么解决高并发大流量问题?下面本篇文章就来给大家分享下高并发大流量web解决思路及方案,希望对大家有所帮助!

和它本身的轻便一样,Bottle库的使用也十分简单。相信在看到本文前,读者对python也已经有了简单的了解。那么究竟何种神秘的操作,才能用百行代码完成一个服务器的功能?让我们拭目以待。1. Bottle库安装1)使用pip安装2)下载Bottle文件https://github.com/bottlepy/bottle/blob/master/bottle.py2.“HelloWorld!”所谓万事功成先HelloWorld,从这个简单的示例中,了解Bottle的基本机制。先上代码:首先我们从b

译者 | 李睿审校 | 孙淑娟Python Web应用程序长期以来一直遵循Web服务器网关接口(WSGI)标准,该标准描述了它们如何与Web服务器通信。WSGI最初于2003年推出,并于2010年更新,仅依赖于Python2.2版本中原生可用的、易于实现的功能。因此, WSGI迅速融入了所有主要的Python Web框架,并成为Python Web开发的基石。快进到2022年。Python2已经过时,Python现在具有处理网络调用等异步操作的原生语法。WSGI和其他默认假定同步行为的标准无法


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Dreamweaver Mac version
Visual web development tools

mPDF
mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool

SublimeText3 Chinese version
Chinese version, very easy to use

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.
