HTML——63.普通按钮和隐藏域

html 复制代码
<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>普通按钮和隐藏域</title>
	</head>
	<body>
		<!--input元素的type属性:(必须要有)-->	
		
		<!--普通按钮:
			1.type="button"
			2.定义的是一个可以点击的按钮,但是没有任何的行为。没有任何的样式
			3.可以用value改变按钮的名称
			4.常用于点击按钮时来启动js程序,绑定js程序
			-->
		<!--隐藏域:(最大的作用就是在我们进行搜索时,对搜索对象划定范围,以便更精确的得到搜索结果)
			1.type="hidden"
			<input type="hidden" name="xjd" value="小家电"/>
			2.隐藏域不会显示在页面中(所以你写了也看不到表现)。一般是网页设计者设置好的数据
			3.表单提交时,隐藏域中的value会提交到服务器
			-->	

		
		<form action="http://127.0.0.1/51zxw.php" method="post">
			用户名:<input type="text" name="uname"/>
			<br />
			密码:<input type="password" name="password"/>
			<br />
			<input type="hidden" name="xjd" value="小家电"/> 
			<br />
			<input type="submit" />
			<input type="reset" />
			
			<input type="button"  value="普通按钮"/>
			<input type="button" />
	
		</form>		
	</body>
</html>

button,submit,reset属性都是按钮,但button就是submit,reset去掉自带文字后的效果,光秃秃的没有样式

< input type="hidden" name="xjd" value="小家电"/> 往服务器发送的内容是:"小家电"

相关推荐
溪语流沙5 分钟前
【每天一个CSS | Day19】流光文字与一笔写成的手写签名
前端·javascript·css
CDwenhuohuo32 分钟前
electron pc项目打包成桌面端
前端·javascript·electron
liulilittle39 分钟前
Linux 下 select 测试函数
linux·服务器·网络·数据库·c++·select·c
copilot中国版1 小时前
PPT Copilot 一键统一全篇版式,告别字体混乱、元素错位和重复排版
html·powerpoint·copilot
luo_guibin1 小时前
Linux系统下OpenSSL升级全流程,新旧版本切换
linux·运维·服务器
看着博客敲代码1 小时前
No space left on device:服务器被 SSH 爆破到日志写满的完整排查与止血
linux·运维·服务器·安全·ssh
极光通讯2 小时前
服务器内存来料检验(IQC)实操:批次追溯、外观判定与上机验证
java·服务器·算法
Raspberry_Pi_官方账号2 小时前
Raspberry Pi Desktop 全面升级,现已登陆 PC 和 Mac
服务器·网络·macos·树莓派·raspberry pi·raspberrypios
Rooting++2 小时前
用友打包的APP壳子怎么获取SHA1码?
运维·服务器
云飞云共享云桌面2 小时前
降本 + 护图纸:珠海制造装备工厂 SolidWorks 服务器共享设计方案
运维·服务器·制造