HTML input elements of the form

<form> Conmon properties of form tags

attributevalue
actionspecify the sending address for submitting the form
methodspecify how to send th form.value1: get. value2:post
enctypedefine the submission type
targetspecify how to open a new window
namedefine the form name

<input> Common properties of input tags

attributevalue
checkedspecifies that the input element is selected when it is first loaded
placeholderdefine prompt fields to help users enter
typespecify the type of input element
valuedefine the value of the input element

Example:

effect
在这里插入图片描述
code part

<form action="www.baidu.com" method="post" enctype="multipart/form-data" target="_blank" name="information form" style="width: 300px;">
        <input name="use-1" placeholder="this is placeholder"><br><br>
        <hr>
        <input name="use-2" type="submit" value="submit"><br><br>
        <hr>
        <input name="use-2" type="checkbox"><br><br>
        <input name="use-2" type="checkbox"><br><br>
        <input name="use-2" type="checkbox"><br><br>
        <hr>
        <input type="button" value="button">
    </form>

<select> Common attributes and supporting tags of select tags

<option> Drop-down option tag,which needs to be embedded in the <select> tag to use.

attributevalue
namedefines the name of the select element,which is used to store the drop-down value
sizedefine the number of visible items in the menu
disabledThis option is disabled when the property is true
multiplespecify multiple optional values
selectedspecify default drop-down items

Example:

effect
在这里插入图片描述

code part

<select name="one" size="1">
            <option>item 1</option>
            <option>item 2</option>
</select>
<br>
<br>
<select name="two" size="2">
            <option>item 1</option>
            <option>item 2</option>
</select>

<button> Tag

document or image class content can be placed in the button element and has the submission function of sunbmit.this is the difference between this element and the button created by the input element.

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值