零基础学习HTML(18)——input标签(二)


注:学习笔记基于小甲鱼学习视频,官方论坛: https://fishc.com.cn/forum.php

官方资料

鱼C课程案例库:https://ilovefishc.com/html5/
html5速查手册:https://man.ilovefishc.com/html5/
css速查手册:https://man.ilovefishc.com/css3/

学习正文

不会 PHP,这几节课学得心累。。。
input标签:https://man.ilovefishc.com/pageHTML5/input.html
通过设置 type 为 search 可以实现搜索框:

<!DOCTYPE html>
<html>
<head>
    <title>第十八节课</title>
    <meta charset="utf-8">
</head>
<body>
	<form action="welcome.php" method="post">
		<label>你想看小甲鱼的哪个课程:<input type="search" name="search"></label>
		<br><br>
		<button type="submit">提交</button>
	</form>
</body>
</html>

在这里插入图片描述

通过设置 type 为 color 可以实现颜色选择:

<!DOCTYPE html>
<html>
<head>
    <title>第十七节课</title>
    <meta charset="utf-8">
</head>
<body>
	<form action="welcome.php" method="post">
		<label>选个颜色:<input type="color" name="color"></label>
		<br><br>
		<button type="submit">提交</button>
	</form>
</body>
</html>

在这里插入图片描述
通过设置 image 属性可以实现自定义图片按钮:

<!DOCTYPE html>
<html>
<head>
    <title>第十七节课</title>
    <meta charset="utf-8">
</head>
<body>
	<form action="welcome.php" method="GET">
		<label>这是一个按钮:<input type="image" src="fishcTor.png" alt="Green Turtle"></label>
	</form>
</body>
</html>

在这里插入图片描述

可以设置 hidden 属性来实现 input 标签的隐藏:

<!DOCTYPE html>
<html>
<head>
    <title>第十七节课</title>
    <meta charset="utf-8">
</head>
<body>
	<form action="welcome.php" method="GET">
		<label>这个按钮被隐藏掉了:<input type="hidden" value="你看不到" disabled></label>
	</form>
</body>
</html>

在这里插入图片描述

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值