HTML basic tutorial: drop-down list in form
The drop-down list
## has the following form:
<select name = “city”> <option value = “合肥”>合肥</option> <option value = “南京”>南京</option> <option value = “杭州”>杭州</option> </select>
- The attribute marked by <select> has only one name attribute
- The attribute marked by <option> has two attributes: value attribute and selected attribute
- Selected: selected by default. Such as: selected = “selected”
<!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>用户注册</title> </head> <body> <font size="5" color="red">欢迎注册php.cn</font> <form name="user" method="get" action="" > 用户名:<input type="text" name="username"/> <br/> 密码:<input type="password" name="userpwd"/> <br/> 性别:<input type="radio" name="sex" value="男" checked=checked>男 <input type="radio" name="sex" value="女">女 <br/> 爱好:<input type="checkbox" name="hobby" value="运动">运动 <input type="checkbox" name="hobby" value="看电影">看电影 <input type="checkbox" name="hobby" value="编程" checked="checked">编程 <input type="checkbox" name="hobby" value="宅着">宅着 <br/>所在地: <select name="city"> <option value="北京">北京<option> <option value="上海">上海<option> <option value="杭州" selected="selected">杭州<option> <option value="南京">南京<option> <option value="合肥">合肥<option> </select> <br/><input type="submit" value="提交信息"/> </form> </body>
new file
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>用户注册</title>
</head>
<body>
<font size="5" color="red">欢迎注册php.cn</font>
<form name="user" method="get" action="" >
用户名:<input type="text" name="username"/>
<br/>
密码:<input type="password" name="userpwd"/>
<br/>
性别:<input type="radio" name="sex" value="男" checked=checked>男
<input type="radio" name="sex" value="女">女
<br/>
爱好:<input type="checkbox" name="hobby" value="运动">运动
<input type="checkbox" name="hobby" value="看电影">看电影
<input type="checkbox" name="hobby" value="编程" checked="checked">编程
<input type="checkbox" name="hobby" value="宅着">宅着
<br/>所在地:
<select name="city">
<option value="北京">北京<option>
<option value="上海">上海<option>
<option value="杭州" selected="selected">杭州<option>
<option value="南京">南京<option>
<option value="合肥">合肥<option>
</select>
<br/><input type="submit" value="提交信息"/>
</form>
</body>
Preview
Clear
- Course Recommendations
- Courseware download
The courseware is not available for download at the moment. The staff is currently organizing it. Please pay more attention to this course in the future~
Students who have watched this course are also learning
Let's briefly talk about starting a business in PHP
Quick introduction to web front-end development
Large-scale practical Tianlongbabu development of Mini version MVC framework imitating the encyclopedia website of embarrassing things
Getting Started with PHP Practical Development: PHP Quick Creation [Small Business Forum]
Login verification and classic message board
Computer network knowledge collection
Quick Start Node.JS Full Version
The front-end course that understands you best: HTML5/CSS3/ES6/NPM/Vue/...[Original]
Write your own PHP MVC framework (40 chapters in depth/big details/must read for newbies to advance)
















