![](https://img-blog.csdnimg.cn/20201014180756757.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
jQuery
E_SSY
这个作者很懒,什么都没留下…
展开
-
jQuery随机数
$(document).ready(function(){ var x = 100; var y = 90;//随意调数字,现在是90-100以内的随机数 var rand = parseInt(Math.random()*(x-y+1)+y); console.log(rand); $('#b')...原创 2018-03-29 13:40:47 · 6839 阅读 · 0 评论 -
手机获取验证码
<span class="obtain-code">获取验证码</span>js: //获取验证码 $(".obtain-code").click(function() { $(this).css('color', '#757575'); settime(this); }); var countdown ...原创 2018-03-29 13:42:15 · 289 阅读 · 0 评论 -
jQuery限制字数
$('.demo').each(function() { var maxwidth = 28; if($(this).text().length > maxwidth) { $(this).text($(this).text().substring(0, maxwidth)); $(this).html(...原创 2018-03-29 13:44:49 · 1693 阅读 · 0 评论 -
错误弹窗2秒后消失
$('.pcbtel-pop').delay(2000).hide(0);原创 2018-03-29 13:47:24 · 804 阅读 · 0 评论 -
返回上一级
$(function(){ $(".return").click(function(){ history.back(-1); });原创 2018-03-29 13:49:09 · 530 阅读 · 0 评论 -
多个图片切换src地址(点击当前图片切换src地址,其他图片仍为默认的状态)
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title></title> </head> <body> <ul class="showSocialList原创 2018-04-20 14:02:30 · 1456 阅读 · 0 评论 -
hover效果更换图片
$(function() { //更换底部图片的src $('.showSocialList li a img').mouseover(function(){ var t = $(this).attr("t"); var imgStr = $(this)[0].src; var arrStr = imgStr.split('_p.png',1); ...原创 2018-04-20 14:04:23 · 4764 阅读 · 1 评论