专注app软件定制开发input禁止输入

input专注app软件定制开发标签禁止输入的方法:

  1.   添加   οnfοcus="this.blur()"  使元素失去焦点  
  2.   将属性   maxlength  的值设为 0  

例如:<input type="number" name="" id="" max="10" min="1" οnfοcus="this.blur()">

例如:<input type="text" maxlength="0">

input标签禁用的方法:

  1.   添加   disabled    禁用属性  
  2.   添加   readonly    只读属性  

注意:“禁用” 和 “禁止输入” 是有区别的,禁用会使input自带的功能丧失,标签呈灰色状态。而禁止输入仍能保持原有功能

 

 注意:下方是源代码,可直接复制

<form action="">

    <input type="text" placeholder="输入用户名" value="" maxlength="4">

    <input type="password" name="" id=""maxlength="6">

    <br>

    <input type="radio" name="chgo" id="">yes

    <input type="radio" name="chgo" id="">no

    <br>

    <input type="checkbox" name="cheeses" id="">one

    <input type="checkbox" name="cheeses" id="">two

    <input type="checkbox" name="cheeses" id="">three

    <input type="file" name="" id="" multiple>

    <input type="submit" value="register">

    <input type="reset" value="reset">

    <input type="button" value="button">

    <button>button</button>

    <input type="number" name="" id="" max="10" min="1" οnfοcus="this.blur()">

    <input type="range" max="20" min="0" value="20">

    <input type="color" name="" id="">

    <input type="date">

    <br>

    <input type="checkbox" name="" id="kikout">

    <label for="kikout">打钩</label>

    <select multiple>

      <option value="">one</option>

      <option value="">two</option>

      <option value="">three</option>

    </select>

    <textarea style="resize: none;"></textarea>

  </form>

网站建设定制开发 软件系统开发定制 定制软件开发 软件开发定制 定制app开发 app开发定制 app开发定制公司 电商商城定制开发 定制小程序开发 定制开发小程序 客户管理系统开发定制 定制网站 定制开发 crm开发定制 开发公司 小程序开发定制 定制软件 收款定制开发 企业网站定制开发 定制化开发 android系统定制开发 定制小程序开发费用 定制设计 专注app软件定制开发 软件开发定制定制 知名网站建设定制 软件定制开发供应商 应用系统定制开发 软件系统定制开发 企业管理系统定制开发 系统定制开发