autocomplete

禁止文本框输入

戏子无情 提交于 2020-03-04 13:09:08
代码如下: readonly、disabled、autocomplete readonly表示此域的值不可修改,仅可与 type=“text” 配合使用,可复制,可选择,可以接收焦点,后台会接收到传值. 代码如下: < input type = " text " name = " www.xxx " readonly = " readonly " /> disabled表示禁用input元素,不可编辑,不可复制,不可选择,不能接收焦点,后台也不会接收到传值 代码如下: < input type = " text " name = " www.xxx.com " disabled = " disabled " /> 另外可以通过css屏蔽输入法: 最后介绍一个常用的标签,浏览器通常会记录input输入框的记录,所以你在输入的时候,经常会下拉很多内容,如下图: 如果你想去掉的话,最好加上autocomplete=“off”,使用方法如下:autocomplete=“off” 代码如下: < input type = " text " autocomplete = " off " id = " number " /> 原文链接:https://blog.csdn.net/handsome_he/article/details/81808900 来源: CSDN 作者: 傲过 链接:

【基础】layui form 的 verify 能做哪些功能

∥☆過路亽.° 提交于 2020-03-03 07:28:21
我们看一下官方的文档 可以知道 它可以识别 title、required(必填属性)、手机、邮箱、数字、日期、链接、身份证、密码 <form class="layui-form" action=""> <div class="layui-form-item"> <label class="layui-form-label">单行输入框</label> <div class="layui-input-block"> <input type="text" name="title" lay-verify="title" autocomplete="off" placeholder="请输入标题" class="layui-input"> </div> </div> <div class="layui-form-item"> <label class="layui-form-label">验证必填项</label> <div class="layui-input-block"> <input type="text" name="username" lay-verify="required" lay-reqtext="用户名是必填项,岂能为空?" placeholder="请输入" autocomplete="off" class="layui-input"> </div> </div>

Kendo UI开发教程:UI Widgets概述

流过昼夜 提交于 2020-02-29 05:53:41
Kendo UI 是基于jQuery 库开发的,Kendo UI widgets是以jQuery 插件形式提供的。这些插件的名称基本上都是以kendo作为前缀。比如 Kendo 的autocomplete UI 组件名称为 kendoAutoComplete ,Kendo UI 手机 UI组件是以 “kendoMobile?为前缀。比如:?kendoMobileListView?. 使用jQuery初始化Kendo UI组件 Kendo UI 组件使用页面上HTML元素来创建,使用CSS选择器 然后调用jquery插件(kendo UI组件)将这些HTML元素转换为Kendo UI组件(基本方法和jQuery UI类似)。 例如:初始化一个自动提示输入框组件(autocomplete) 1 2 3 4 < input id = "“autocomplete”" > < script > $(“#autocomplete”).kendoAutoComplete([“Apples”, “Oranges”, “Grapes”]); </ script > 其中 $(?#autocomplete?).kendoAutoComplete([?Apples?, ?Oranges?, ?Grapes?]); 完成两项任务: 查找Id为autocomplete的HTML元素,

学习01-html(新增语义化标签,多媒体标签,表单属性)

我是研究僧i 提交于 2020-02-29 02:58:29
新增语义化标签 header 头部标签 nav 导航栏标签 article 内容标签 section 块级标签 aside 侧边栏标签 footer 尾部标签 多媒体标签 audio音频 三总音频格式 Ogg vorbis; Mp3; Wav; 属性 autoplay autoplay 如果出现该属性则音频在就绪后 马上播放 controls controls 如果出现该属性,则像用户显示控件,比如按钮播放 loop loop 如果出现该属性,则每当音频结束时重新开始播放 src url 要播放的音频的URL 语法 单个文件语法 <audio src="audio/01.mp3" controls="controls" controls></audio> 多个播放设置 <audio controls="controls"> <source src="mp3路径地址" type="audio/mpeg"> <source src="ogg路径地址" type="audio/ogg"> </audio> video视频 三种视频格式 Ogg; MPEG4; WebM; 属性 autoplay autoplay 视频就绪自动播放 controls controls 向用户显示控件播放 width pixels(像素) 设置播放器宽度 height pixels(像素) 设置播放器高度

Minimal symbols amount for data upload in autocomplete

末鹿安然 提交于 2020-02-29 02:04:53
问题 I'm trying to create city autocomplete in checkout, but the problem is that amount of data that being sent is too large. So i was thinking about uploading data only after certain amount of symbols typed in field, lets say 3. But I don't know how to do this using native bindingHandlers. Here is js file: define([ 'Magento_Ui/js/form/element/abstract', 'mage/url', 'ko', 'jquery', 'jquery/ui' ], function (Abstract, url, ko, $) { 'use strict'; ko.bindingHandlers.shippingAutoComplete = { init:

关于火狐浏览器刷新不重置表单元素

吃可爱长大的小学妹 提交于 2020-02-28 18:50:27
今天测试发现一个问题,经过反复测试发现是浏览器引起的。 情景demo如下: 在某个简单页面中,比如值包含一个text的输入框,内容为空 随便输入一些内容,比如“test”; 按F5刷新,展现结果。 在chrome中 输入框内容为初始的空状态 在火狐浏览器中 输入框则展现了刚刚输入的 “test” (版本 48.0.2) < html > < body > < input type = "text" value = "" > </ body > </ html > 在火狐中只有按ctrl+F5 强制刷新才会出现空状态 解决办法: 在网上找到一种办法,就是在元素上加上属性 autocomplete 并设置为off < input type = "text" value = "" autocomplete = "off" > 这个属性是HTML5 新增加的,在w3school中找到如下解释( w3school链接 ): autocomplete 属性规定输入字段是否应该启用自动完成功能。 自动完成允许浏览器预测对字段的输入。当用户在字段开始键入时,浏览器基于之前键入过的值,应该显示出在字段中填写的选项。 注释:autocomplete 属性适用于 <form>,以及下面的 <input> 类型:text, search, url, telephone, email, password,

web移动端学习:高德地图demo(二)

喜夏-厌秋 提交于 2020-02-27 12:49:01
在上一篇中使用了JS的方式加载插件,现在可以使用官方推荐的方法加载所需的插件 就是在header标签里的script标签中的KEY值后面加上 &plugin=AMap.Autocomplete 如下 <script type="text/javascript" src="https://webapi.amap.com/maps?v=1.4.15&key=申请到的KEY&plugin=AMap.Autocomplete"></script> 使用之前的调用函数依旧有效 new AMap.Autocomplete().search(this.value,function(status,data){ console.log(data.tips); }) 但这里推荐使用官方推荐的写法,更加简便而且美观 var auto = new AMap.Autocomplete({ input:'sinput'//直接给到一个输入框的id }); 在高德开发者手册里还有介绍其他手册,请自行查询 高德地图开发者WEB手册: 输入提示和POI搜索 运行效果: 自带样式的搜索结果好看很多,但这里只出现了搜索结果 要实现点击搜索结果跳转,还需要调用select事件。 var auto = new AMap.Autocomplete({ input:sinput }); //点击结果跳转 auto.on(

web移动端学习:高德地图demo(一)

余生颓废 提交于 2020-02-26 17:39:30
在高德地图开发中申请开发者资格,然后在控制台中新建应用,获得KEY; 新建模板HTML文件; <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>地图demo</title> <script type="text/javascript" src="https://webapi.amap.com/maps?v=1.4.15&key=申请到的KEY"></script> <style type="text/css"> *{margin: 0;padding: 0;} #container {width:100%; height:100%;position: absolute; left: 0;top: 0;} </style> </head> <body> <div id="container"></div> <script type="text/javascript"> var map = new AMap.Map('container',{ zoom:12 , center:[114.05,22.5]//深圳 }); map.on('moveend',function(){ console.log(map.getCenter().toString()); }) map.on('zoomend'

Material Design autocomplete make an item unselectable

醉酒当歌 提交于 2020-02-25 13:40:27
问题 I'm using Material Design and AngularJS and I want to display some unselectable element in my autocomplete. My autocomplete display entity that could be linked with the entity that the user is working on. Some of these entities are already linked to another entity. I want to display them but make them unselectable. Here my autocomplete in a tpl.html file : <md-autocomplete md-no-cache="noCache" md-selected-item="selectedItem" md-search-text="searchText" md-selected-item-change= "controller

Material Design autocomplete make an item unselectable

╄→尐↘猪︶ㄣ 提交于 2020-02-25 13:40:27
问题 I'm using Material Design and AngularJS and I want to display some unselectable element in my autocomplete. My autocomplete display entity that could be linked with the entity that the user is working on. Some of these entities are already linked to another entity. I want to display them but make them unselectable. Here my autocomplete in a tpl.html file : <md-autocomplete md-no-cache="noCache" md-selected-item="selectedItem" md-search-text="searchText" md-selected-item-change= "controller