- 博客(8)
- 收藏
- 关注
原创 jQuery获取验证码倒计时的实现
<input type="button" id="btn" value="获取验证码" onclick="sendmsg()"></input>//注意不要定义在$(function(){})里var countdown=60;function sendmsg(){ if(countdown==0){ $("#btn").attr("
2018-02-23 10:53:22 1544
转载 让border、padding等不改变原本宽度
http://www.w3school.com.cn/cssref/pr_box-sizing.aspbox-sizing:border-box;-moz-box-sizing:border-box; /* Firefox */-webkit-box-sizing:border-box; /* Safari */
2017-03-26 11:45:56 4443
原创 设置html链接的目标地址在新窗口打开
设置以后网页中所有链接都在新窗口打开。或者将arget="_blank"加在标签中,,单个链接在新窗口中打开。其中的target定义的为打开方式 网页打开方式有以下几种: _self(默认)、_top、_blank、_parent 1._self表示“相同窗口”。点击链接后,地址栏不变。在网页中没有做设置时,网页链接默认的窗口为_self。 2._
2017-03-10 11:42:21 5213
原创 文字溢出时变省略号css
{overflow: hidden; white-space: nowrap; text-overflow: ellipsis;}
2017-03-10 09:24:26 185
原创 css中的position属性
position默认值:staticfixed:生成绝对定位的元素,相对于浏览器窗口进行定位。relative:生成相对定位的元素,相对于其正常位置进行定位。absolute:生成绝对定位的元素,相对于static 定位以外的第一个父元素进行定位。例如:hellochild根据parent的位置进行定位。helloch
2017-03-08 14:08:00 317
原创 js判断是不是在微信里打开的
function isWeChat(){ var ua = navigator.userAgent.toLowerCase(); if(ua.match(/MicroMessenger/i)=="micromessenger") {return true; } else { return false; }}
2017-03-08 12:05:49 299
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人