类型为search的input及相关属性
作者:aoao 来源:样式之美 发布时间:2009-02-11 12:49:00
其实在很久很久之前就发现search类型的input,该属性值是WebKit私有,不过一直没去查相关的属性,介于XXX原因,我找出其属性,回头考虑在其他浏览器上也实现这样的效果。表扬一下Yupoo,他们上次改版就使用上介个。
如果你使用的是Safari(iphone上的不一样,不过会Go按钮会变成Search)或者是其他WebKit引擎的浏览器的话,你就可以看出下面这个input与其他的不同了。
看不到的朋友可以看一下图片:
看一下相关的代码:
<input type="search" placeholder="测试搜索" autosave="aoao.org.cn" results="8" >
相关的说明,就几个属性的介绍,比较简单,没有译了中文,大家看看就是,其实不用看也要以猜得出。
The incremental attribute can be used to control whether or not the search is performed as you type.
The placeholder attribute can be used to set the greyed placeholder text in the control.
The autosave attribute allows you to specify an autosave name for your search results in the dropdown. What’s cool about the autosave is that it’s global, which means that two Web sites could put up a search field with an autosave name of google and then they would share the search results. (Since the actual result values are not accessible to the page there is no privacy violation.)
The results attribute allows you to specify how many results should be displayed in the dropdown.
The search DOM event fires at the precise time the search should be performed and obeys the heuristic for the control, so you don’t have to trap key and click events at all. You can use the onsearch attribute on the control to respond when the search happens.
BTW:CSS Naked Day差不多到了,今年改在9号,有兴趣的朋友凑凑热闹。


猜你喜欢
- Go Gin 实现文件的上传下载流读取文件上传routerrouter.POST("/resources/common/uploa
- 首先非常感谢作者针对bootstrap table分页问题进行详细的整理,并分享给了大家,希望通过这篇文章可以帮助大家解决Bootstrap
- 2005转到2000的步骤 1. 生成for 2000版本的数据库脚本 2005 的manger s
- 从Access数据库中选取记录有件最令人丧气的事情,它们是以怎样的顺序输入到数据库内就按照怎样的顺序出来。就算你在Access环境内采用So
- 上传图片: if (!empty($_FILES["img"]["name"])) { //提取文件
- 引言本文主要梳理了flask源码中route的设计思路。首先,从WSGI协议的角度介绍flask route的作用;其次,详细讲解如何借助w
- 系统默认是torch.FloatTensor类型data = torch.Tensor(2,3)是一个2*3的张量,类型为FloatTens
- 生成随机密码这件事情用python来干确实相当的方便,优美的string方法加上choice简直是绝配make_password.py###
- 目录一、基本用法二、计数循环三、字符串遍历循环四、列表遍历循环五、文件遍历循环六、遍历循环的扩展模式一、基本用法for <循环变量&g
- Python3.5 版本引入了类型提示(Type Hints),它允许开发者在代码中显式地声明变量、函数、方法等的类型信息。这种类型声明不会
- 这段时间服务器崩溃2次,一直没有找到原因,今天看到论坛发出的错误信息邮件,想起可能是MySQL的默认连接数引起的问题,一查果然,老天,默认
- 如何在页面中实现对电子信箱的访问?emaile.htm<HTML><HEAD><META NAME=
- 在使用 peewee 框架时,默认是不会出现日志消息的。from peewee import Model, CharField, DateT
- 设计思路本文整理归纳以往的工作中用到的东西,现汇总成基础测试框架提供分享。框架采用python3 + selenium3 + PO + ya
- 本文实例讲述了python根据文件大小打log日志的方法,分享给大家供大家参考。具体方法如下:import glob import logg
- 没什么实际用途,纯属消遣Quick Click<html><head><title>Quick_Clic
- 代码如下import sysfrom PyQt5.QtWidgets import QApplication, QWidgetclass E
- 后台管理配置动态路由菜单前段时间做一个后台管理项目,因为超级管理员可以给普通管理员动态更改权限,所以vue-element-admin里的写
- 本文采用vue,同时增加鼠标点击事件和一些页面小优化基本结构新建一个sandBox.vue文件编写功能的基本结构 <div class
- 相信很多朋友在用Python写完代码之后都迫不及待的想发给对象交流(装X),但是发源码又要求对方有对应的解释器,一般是行不通的,所以我们要把