input属性及其应用

10 篇文章 0 订阅
实现打电话和发送短信:							
 
 
<a href="tel:10086">拨打10086</a>
<a href="sms:10086">发短信</a>
 <input type="submit" value="Submit" />                                                    //加οnfοcus="if(value=='密码') {value=''}" οnblur="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/*"/>

手机拍照和上传图片

HTML5与移动端web学习笔记

 

 
 
bootstrap去掉获取焦点时有虚边
.form-control:focus,input:focus{
outline: none;
box-shadow: none;
}
  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值