-
div:块级元素,默认占一行 span 行内元素
查看全部 -
<input type="reset" value="重置">type:只有当type值设置为reset时,按钮才有重置作用value:按钮上显示的文字查看全部 -
<body>
<form method="post" action="save.php">
<label for="myName">姓名:</label>
<input type="text" value=" " name="myName " />
<input type="submit" value="提交" name="submitBtn" />
</form>
</body>type:只有当type值设置为submit时,按钮才有提交作用value:按钮上显示的文字查看全部 -
<body>
<form>
<select>
<option value="看书">看书</option>
<option selected="selected" value="旅游">旅游</option>
<option value="运动">运动</option>
<option value="购物">购物</option>
</select>
</form>
</body><selected>标签用于下拉列表
<option>列表信息</opiton>
<option value="提交信息" selected="selected">列表信息(为默认选项)</opiton>
</selected>
查看全部 -
<body>
<form action="save.php" method="post">
<label>性别:</label>
<label>男</label>
<input type="radio" value="1" name="gender" />
<label >女</label>
<input type="radio" value="2" name="gender" />
</form>
</body>checkbox 复选框
radio 单选框-同一组的单选按钮,name 取值一定要一致,这样同一组的单选按钮才可以起到单选的作用。
查看全部 -
for属性相关联同id的元件
标签的 for 属性中的值应当与相关控件的 id 属性值一定要相同。
<label for="控件id名称">
查看全部 -
<body>
<form>
<textarea cols="50" rows="10">在这里输入内容...</textarea>
</form>
</body><textarearows="行数"cols="列数">文本</textarea>textarea 用于在输入大片文字的文本框设置
查看全部 -
1、Input的type属性设置为email,则表示该输入框的类型为邮箱。
2、数字框的值必须包含@。
3、数字框的值@之后必须有内容,否则会报错误提示
<body>
<input type="email"
</body>查看全部 -
<body>
<input type="url">
</body>技术点的解释:
1、input的type属性设置为url,则表示该输入框的类型为网址。
2、数字框的值需以http://或者https://开头,且后面必须有内容,否则表单提交的时候会报错误提示。
查看全部 -
<input type="number">
输入值只能是数字,并可以调整大小
查看全部 -
placeholder属性为输入框占位符,里面可以放提示的输入信息。
2、placeholder属性的值可以任意填写,当输入框输入内容时,占位符内容消失,输入框无内容时,占位符内容显示。
3、占位符内容不是输入框真正的内容。
查看全部 -
<form> <input type="text/password" name="名称" value="文本" /> </form>
1、type:当type="text"时,输入框为文本输入框;当type="password"时,输入框为密码输入框。2、name:为文本框命名,以备后台程序ASP 、PHP使用。3、value:为文本输入框设置默认值。(一般起到提示作用)查看全部 -
for的作用是来连着同一id的选中状态
查看全部 -
<body>
<form method="post" action="save.php">
<label for="username">用户名:</label>
<input type="text" name="username" id="username" value="" /><br/>
<label for="pass">密码:</label>
<input type="password" name="pass" id="pass" value="" /><br/>
<input type="submit" value="确定" name="submit" />
<input type="reset" value="重置" name="reset" />
</form>
</body>查看全部 -
<table border=5 >
<thead>
<th>科目</th>
<th>分数</th>
</thead>
<tbody>
<tr>
<td>语文</td>
<td>99</td>
</tr>
<tr>
<td>数学</td>
<td>60</td>
</tr>
</tbody>
<tfoot>
<tr>
<td>总分</td>
<td>159</td>
</tr>
</tfoot>
</table>查看全部
举报