分享web开发知识

注册/登录|最近发布|今日推荐

主页 IT知识网页技术软件开发前端开发代码编程运营维护技术分享教程案例
当前位置:首页 > 网页技术

006_form.html

发布时间:2023-09-06 02:15责任编辑:熊小新关键词:暂无标签

version1

<!DOCTYPE html>
<html lang="en">
<head>
???<meta charset="UTF-8">
???<title>span</title>
</head>
<body>
???<form action="http://baidu.com" method="GET">
???????<input type="text" name="user"/>
???????<input type="text" name="emil"/>
???????<input type="password" name="psword"/>
???????<!--<input type="button" value="login1"/> useless-->
???????<input type="submit" value="login2"/>
???</form>
</body>
</html>

<!-- ?block tag : The contents of the element will occupy the entire line ?-->
<!-- ?inline tag : The contents of the element will just occupy it‘s length ?-->


version2
<!DOCTYPE html>
<html lang="en">
<head>
???<meta charset="UTF-8">
???<title>span</title>
</head>
<body>
???<form action="https://www.sogou.com/web?">
???????<input type="text" name="query"/>
???????<input type="submit" value="login2"/>
???</form>
</body>
</html>

<!-- ?block tag : The contents of the element will occupy the entire line ?-->
<!-- ?inline tag : The contents of the element will just occupy it‘s length ?-->


version 3
<!DOCTYPE html>
<html lang="en">
<head>
???<meta charset="UTF-8">
???<title>span</title>
</head>
<body>
???<form enctype="multipart/form-data">
???????????<!--if you want to submit a file,you must add the attribute of enctype-->
???????<div>

???????????<p>choise sex:</p>
???????????man:<input type="radio" name="sex" value="man" checked="checked"/>
???????????woman:<input type="radio" name="sex" value="woman"/>
???????????<p>favorite</p>
???????????basketball:<input type="checkbox" name="favor" value="1" checked="checked"/>
???????????football:<input type="checkbox" name="favor" value="2" />
???????????desktopball:<input type="checkbox" name="favor" value="3" />
???????????taiqiu:<input type="checkbox" name="favor" value="4" />
???????????wanqiu:<input type="checkbox" name="favor" value="5" />
???????????<p>skill</p>
???????????make:<input type="checkbox" name="skill"/>
???????????coding:<input type="checkbox" name="skill"/>
???????????java:<input type="checkbox" name="skill"/>
???????????c++:<input type="checkbox" name="skill"/>
???????????python:<input type="checkbox" name="skill"/>
???????????<p>submit a file</p>
???????????<input type="file" name="filename">
???????????????<!--<form enctype="multipart/form-data"> is needed if you want use type="file"-->
???????</div>

???????<textarea name="content" >default content</textarea>

???????<select name="city" size="10" multiple="multiple">
???????????<option value="1">beijing</option>
???????????<option value="2" selected="selected">nanjing</option>
???????????<option value="3">hefei</option>
???????????<option value="4">guangzhou</option>
???????????<option value="5">tianjing</option>
???????????<option value="6">hangzhou</option>
???????????<option value="7">fujian</option>
???????????<option value="8">dalian</option>
???????</select>
???????<input type="submit" value="submit">
???????<input type="reset" value="reset">
???</form>
</body>
</html>

<!-- ?block tag : The contents of the element will occupy the entire line ?-->
<!-- ?inline tag : The contents of the element will just occupy it‘s length ?-->


006_form.html

原文地址:https://www.cnblogs.com/liujun5319/p/9657918.html

知识推荐

我的编程学习网——分享web前端后端开发技术知识。 垃圾信息处理邮箱 tousu563@163.com 网站地图
icp备案号 闽ICP备2023006418号-8 不良信息举报平台 互联网安全管理备案 Copyright 2023 www.wodecom.cn All Rights Reserved