input属性及其应用
来源:互联网 发布:java删除文件 编辑:程序博客网 时间:2024/04/30 05:47
实现打电话和发送短信:<
a
href
=
"tel:10086"
>拨打10086</
a
>
<
a
href
=
"sms:10086"
>发短信</
a
>
<input type="submit" value="Submit" />
//加onfocus="if(value=='密码') {value=''}" onblur="if (value=='') {value='密码'}" data-role="none"
type的类型: type为以上属性是input可用的属性:
通用type=“”属性: autocomplete="off"或"on";浏览器基于之前输入过的值,应该显示出在字段中填写的选项。
E-mail: <input type="email" name="email"autocomplete="off"
/> autofocus="autofocus"可以直接简写autofocus;打开页面自动获取input的焦点。(不适 用于 type="hidden") list="";前提有datalist标签才能用如: <form action="/example/html5/demo_form.asp">网页:<input type="url" list="url_list" name="link" /><datalist id="url_list"><option label="W3School" value="http://www.w3school.com.cn" /><option label="Google" value="http://www.google.com" /><option label="Microsoft" value="http://www.microsoft.com" /></datalist><input type="submit" /> </form>
type="file"时:
<input type="file" name="pic" id="pic"accept="image/gif, image/jpeg"
/> 限定图像上传的格式为gif和jpeg,如果不限制图像的格式,可以写为:accept="image/*" 其效果就是点击上传时,被上传的文件夹里的图片只有限定的格式图片会显示,其他的不显示 multiple="multiple"属性规定输入字段可选择多个值,上传的图片可以是多张。
手机端调用摄像头加capture <input type="file" capture />或<
input
type
=
"file"
capture
=
"camera"
accept
=
"image/*"
/>
手机拍照和上传图片
bootstrap去掉获取焦点时有虚边.form-control:focus,input:focus{outline: none;box-shadow: none;}
0 0
- input属性及其应用
- form、input元素及其属性
- Form表单属性及其常用的INPUT控件
- Form表单属性及其常用的INPUT控件
- Form表单属性及其常用的INPUT控件
- input中disable与readonly的区别及其相关属性
- input标签动态设置只读属性及其兼容性
- HTML5中新增的input类型及其属性
- input 属性
- Input属性
- input标签的hidden属性的应用及作用
- input标签的hidden属性的应用及作用
- 关于html5<input>标签新属性的应用
- input标签的hidden属性的应用及作用
- input 里的一些属性应用(1)
- Input输入控件的size与maxlength及其disabled与readonly属性的区别
- HTML5第四课时,表单的应用及其属性
- input对象的属性
- 数据库分页查询方法
- 导航栏背景色改变
- Activity转View(方法已过时)
- 关于webview 的一些问题
- 清除Ghost系统中自动安装的垃圾软件
- input属性及其应用
- Hibernate 缓存机制
- 机房水题欢乐赛 2016-02-17
- 此证书的签发者无效
- 查询某个字段在哪些表里出现
- Heka插件编写
- 吴佳俊
- index condition pushdown(icp)---mysql5.6新功能
- C语言typedef struct详解