当前位置: 首页 > news >正文

HTML基本元素包含HTML表单验证

可将以下代码复制另存为一个HTML文件浏览器打开自己去看看实际使用效果

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"><title>测试</title>
</head>
<body>
<h1>很多事</h1>
<h1><b>加粗文字</b></h1>
<h1><i>斜体文字</i></h1>
<h1><code>电脑输出文字效果</code></h1>
<h1>7<sub>1下标</sub><sup>2上标</sup></h1>
<h1 style="text-decoration:underline;">下划线</h1>
<h1 style="text-decoration:line-through;">删除线</h1>
<h1 style="text-decoration:overline;">上划线</h1><h1 style="text-indent:2em ">缩进</h1>
<h1 style="text-align: center;">水平居中显示</h1><hr><br><br>
<p>的基础上肯定不能京东方出</p>
<p>更好vu根本vu计划搜嘎大V古一哈果然VB依噶是呀付刚<br>擦韵达GV出一哈</p>
<hr><br><br>
<a href="https://www.runoob.com/try/try.php?filename=tryhtml_basic_link">菜鸟教程</a>
<a href="https://www.runoob.com/try/try.php?filename=tryhtml_basic_link" target="_blank">新窗口打开</a>
<a href="https://www.runoob.com/try/try.php?filename=tryhtml_basic_link" target="_self">此窗口打开</a>
<a href="https://www.runoob.com/try/try.php?filename=tryhtml_basic_link" >
<img src="http://p4.itc.cn/q_70/images03/20200925/cd3a5707b185480898c89c2c9c11fbf2.jpeg" style="height: 50px;width: 50px" alt="示例图片">
</a>
<hr><br><br>
<img src="https://pics1.baidu.com/feed/8435e5dde71190eff03ade7625f43d1efffa604a.jpeg@f_auto?token=dc0a18c359a9b61d857e8cd38aecf0b4" style="height: 50px;width: 50px">
<hr>
<br><h1>表格</h1>
<h4>一列</h4>
<table border="1px">
<tr><td>100</td></tr>
</table>
<br><h4>二行二列</h4>
<table border="1px">
<tr><td>100</td><td>200</td></tr>
<tr><td>568</td><td>545</td>
</tr>
</table><hr><table border="1"><thead><tr><th>Month</th><th>Savings</th></tr></thead><tfoot><tr><td>Sum</td><td>$180</td></tr></tfoot><tbody><tr><td>January</td><td>$100</td></tr><tr><td>February</td><td>$80</td></tr></tbody>
</table><h4>无序列表</h>
<ul><li>fsd</li><li>sds</li></ul><h4>有序列表(type属性可设置序号标识如123,abc...)</h4>
<ol><li>ccvfdv</li><li>vdfvdf</li></ol>
<h4>自定义列表</h4>
<dl>
<dt>Coffee</dt>
<dd>- black hot drink</dd>
<dt>Milk</dt>
<dd>- white cold drink</dd>
</dl><hr><br><h1>表格</h1><form action=""><label>用户名</label><input type="text" name="username" id="username" required><label>请输入密码</label><input type="password" name="password" id="password"><button style="submit">登录</button>
</form><hr>
<h4>下拉框</h4>
<form action="">
<select id="test" name="test"><option value="a">a</option><option value="b">b</option><option value="c">c</option></select>
</form>
<hr><br>
<h4>单选框</h4>
<form action=""><input type="radio" name="sex" value="boy">男<input type="radio" name="sex" value="girl">女</form><form action=""><input type="checkbox" name="lief" value="vosion">望远镜<input type="checkbox" name="lief" value="basscatball">篮球</form><h1>表格外框</h1>
<fieldset><legend>用户登录</legend><form action="" method=""><label>用户名</label><input type="text" name="username"><label>密码</label><input type="password" name="password"><button type="submit" name="submit">登录</button></form>
</fieldset>
<hr>
<h1>iframe框</h1>
<iframe src="https://www.bilibili.com/" width="200px" height="200px"></iframe><hr>
<h4>点击链接 在iframe框显示</h4>
<iframe src="" width="200px" height="200px" name="iframe"></iframe>
<a href="https://www.bilibili.com/" target="iframe">点击此处显示</a><hr><h1>javascript初使用</h1>
<p id="lll">这是一个段落</p>
<button onclick="myFunction()">点击改变内容</button>
<script>
function myFunction()
{document.getElementById("lll").innerHTML="Hello JavaScript!";
}
</script><h1>input应该放入form表中使用,利用type=submit提交数据较便捷</h1>
<hr>
<h1>input类型</h1>
<label>选择颜色color类型</label>
<input type="color" name="">
<hr>
<label>选择日期date类型</label>
<input type="date" name=""><hr>
<label>选择邮件email类型</label>
<input type="email" name="">
<hr>
<label>选择月份month类型</label>
<input type="month" name=""><hr>
<label>选择数字number类型1-10</label>
<input type="number" name="" min="0" max="10"><hr>
<label>选择数字滚动条range类型1-10</label>
<input type="range" name="" min="0" max="10"><hr>
<label>搜索框search类型</label>
<input type="search" name=""><hr>
<label>电话号码tel类型</label>
<input type="tel" name=""><hr>
<label>选择时间time类型</label>
<input type="time" name="">
<hr>
<label>选择周week类型</label>
<input type="week" name="">
<hr>
<label>网址url类型</label>
<input type="url" name=""><h1>搜索框输入自动查询</h1>
<form><!-- type和搜索框列表名绑定 --><input list="llist" name="">
<datalist id="llist"><option value="雾山五行">雾山五行</option><option value="海绵宝宝">海绵宝宝</option><option value="奥特慢">奥特曼</option></datalist>
</form>
<hr>
<br>
<h1>表单内容自动填充autocomplet</h1>
<form autocomplete="on"><!-- autofocus自动聚焦 --><!-- required必须填写,不能为空 -->姓名:<input type="text" name="" autofocus="" required="">邮箱:<input type="email" name="">
</form><h1>存放链接nav</h1>
<nav>
<a href="/html/">HTML</a> |
<a href="/css/">CSS</a> |
<a href="/js/">JavaScript</a> |
<a href="/jquery/">jQuery</a>
</nav>
</body>
</html>

相关文章:

  • 自友科技破解走班教育排课难题
  • 尚品汇项目
  • c++与c
  • 云原生和“可移植性”到底意味着什么
  • @vue-office/excel 解决移动端预览excel文件触发软键盘
  • docker命令 docker ps -l 命令在 Docker 中用于列出最近一次创建的容器
  • Vue3生命周期
  • 【深度学习】温故而知新4-手写体识别-多层感知机+CNN网络-完整代码-可运行
  • 没有知网资源如何快速下载知网论文
  • 号称超级增程电动,领克07EM-P带来技术变革?
  • 【Linux内核-编程指南】
  • 小程序集arcgis地图显示自定义坐标的功能实现记录!(学习笔记)
  • 云原生架构案例分析_3.某快递公司核心业务系统云原生改造
  • C++ | Leetcode C++题解之第130题被围绕的区域
  • 大数据数据治理工具
  • ESLint简单操作
  • FineReport中如何实现自动滚屏效果
  • JavaScript 无符号位移运算符 三个大于号 的使用方法
  • laravel with 查询列表限制条数
  • laravel 用artisan创建自己的模板
  • Netty 4.1 源代码学习:线程模型
  • Node项目之评分系统(二)- 数据库设计
  • SegmentFault 2015 Top Rank
  • Three.js 再探 - 写一个跳一跳极简版游戏
  • UMLCHINA 首席专家潘加宇鼎力推荐
  • 程序员最讨厌的9句话,你可有补充?
  • 试着探索高并发下的系统架构面貌
  • 手机端车牌号码键盘的vue组件
  • 我感觉这是史上最牛的防sql注入方法类
  • 学习ES6 变量的解构赋值
  • 智能合约Solidity教程-事件和日志(一)
  • #调用传感器数据_Flink使用函数之监控传感器温度上升提醒
  • (Java企业 / 公司项目)点赞业务系统设计-批量查询点赞状态(二)
  • (vue)el-tabs选中最后一项后更新数据后无法展开
  • (zhuan) 一些RL的文献(及笔记)
  • (接口自动化)Python3操作MySQL数据库
  • (论文阅读31/100)Stacked hourglass networks for human pose estimation
  • (亲测有效)推荐2024最新的免费漫画软件app,无广告,聚合全网资源!
  • (三)centos7案例实战—vmware虚拟机硬盘挂载与卸载
  • (使用vite搭建vue3项目(vite + vue3 + vue router + pinia + element plus))
  • (数据大屏)(Hadoop)基于SSM框架的学院校友管理系统的设计与实现+文档
  • (四)库存超卖案例实战——优化redis分布式锁
  • (学习总结)STM32CubeMX HAL库 学习笔记撰写心得
  • (转)Oracle 9i 数据库设计指引全集(1)
  • .htaccess配置重写url引擎
  • .net core开源商城系统源码,支持可视化布局小程序
  • .net framework4与其client profile版本的区别
  • .Net 基于MiniExcel的导入功能接口示例
  • .NET 中选择合适的文件打开模式(CreateNew, Create, Open, OpenOrCreate, Truncate, Append)
  • .NET面试题解析(11)-SQL语言基础及数据库基本原理
  • .sys文件乱码_python vscode输出乱码
  • /usr/bin/python: can't decompress data; zlib not available 的异常处理
  • @RequestBody与@RequestParam
  • @RunWith注解作用
  • @SpringBootApplication 注解