自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(38)
  • 资源 (3)
  • 收藏
  • 关注

原创 浏览器兼容播放wav格式

   //播放报警的声音  function PlaySound(){            var borswer = window.navigator.userAgent.toLowerCase();        //alert(borswer);        //IE内核浏览器        if (borswer.indexOf("trident") >= 0) {       ...

2016-09-13 09:35:38 5477

转载 移动端rem自适应屏幕两种方案

css:@charset "utf-8";/*12px===0.6rem 设计图字体大小/20=开发字体大小+rem*/html { font-size: 107%; -webkit-text-size-adjust:none; text-size-adjust:none;}@media only screen and ( min-width: 320px) { htm...

2018-05-23 10:45:00 674

翻译 当滑动到页面某处显示该效果做法/*滚动条大于150位置显示 从左往右移动效果*/

(1)/*对话动画效果css*/.s_default{ -webkit-transition: all 1s ease; transition: all 1s ease; -webkit-transform: translateY(20px); -ms-transform: translateY(20px); transform: translateY(20px); opa...

2018-05-18 10:59:56 366

翻译 移动端禁止图片长按和vivo手机点击img标签放大图片,禁止长按识别二维码或保存图片

/*移动端禁止图片长按和vivo手机点击img标签放大图片,禁止长按识别二维码或保存图片*/img{ pointer-events: none;vertical-align: sub;}

2018-05-18 10:47:52 5495

原创 移动端自适应布局 (手滑动图片,使用swiper插件非常好用)

(1)html : <div class="module device"> <div class="swiper-container setCenter"> <div class="swiper-wrapper"> <div class="swiper-slide"&amp

2018-05-18 10:46:07 3161

转载 jQuery图片延迟加载插件jQuery.lazyload 前端大图片显示优化

http://www.jq22.com/jquery-info390

2018-05-14 15:15:40 344

翻译 背景渐变兼容性写法(兼容到ie8以上,包括ie8) 原创链接https://www.cnblogs.com/xiongmanli/p/6080434.html

/*兼容性背景渐变写法*/.smartServices-title{background: #1f8fff;background: -moz-linear-gradient(top, #1f8fff 0%, #23b3ff 100%);background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#1f8fff)...

2018-04-24 11:41:30 403

原创 js实现时间控件,PC端展示 带点日期插件

html:<div class="dotDate"></div><style type="text/css"> /* 日期样式 */ .datePicker caption{text-align:center;} .datePicker caption label{cursor: default;display:inline-block;wid...

2018-04-20 11:12:57 2348

原创 js操作frame

html,body,iframe{width:98%;height:80%}      function addIframe(){var baiduFrame = window.frames["newIframe"];//根据name值来获取iframeif(baiduFrame!=undefined){alert(document.getElementById("

2016-12-07 18:34:58 1114

原创 jquery移动端回到顶部

//回到顶部    FunGoTop: function () {        //屏幕高        var shebieGao = window.screen.width;        var bubuko_scrollheight =parseInt(shebieGao)*2;     //页面离开顶部的距离,超过该距离才出现返回顶部图片        var ob

2016-12-06 14:02:25 1049

原创 移动端调用百度地图APP导航

// 安卓            $("#daohang").attr("href", "bdapp://map/direction?origin=latlng:" + ph_lat + "," + ph_lng + "|name:我的位置&destination=latlng:" + car_lat + "," + car_lng + "|name:车位置&mode=driving&src=

2016-12-06 14:00:08 1983

原创 jquery 弹出提示div 等待2秒自动关闭

var tishi={  m_tishi :null,//全局变量 判断是否存在div,   //提示div 等待2秒自动关闭    Funtishi: function (content, url) {        if (HuiFang.m_tishi == null) {            HuiFang.m_tishi = ' <p class="app_

2016-11-29 17:14:51 2518 1

转载 js 获取日期,获取今天,昨天,前天,两天内,三天内,四天内,五天内 日期函数

var dates={ //获取日期    FunGetDateStr: function (p_count) {        var dd = new Date();        dd.setDate(dd.getDate() + p_count);//获取p_count天后的日期         var y = dd.getFullYear();       

2016-11-22 16:37:53 5691

原创 js判断 ios微信访问

//判断是ios                        if (/(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent)) {                            //判断ios微信                            var ua = window.navigator.userAgent.toL

2016-10-19 14:09:39 295

原创 安卓,ios,ios微信, 自动播放音频;

必须触发:   $(document).ready(function () {       //由于安卓4.2版本以上,IOS由于安全原因禁用自动播放        $("html").one("touchstart", function () {            var audio = document.getElementById("chatAudio");   

2016-10-19 14:06:33 662

转载 js判断访问是电脑,安卓,苹果手机

if (/(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent)) { //alert(navigator.userAgent); window.location.href ="iPhone.html";} else if (/(Android)/i.test(navigator.userAgent)) { //alert

2016-10-13 17:32:22 457

转载 js 获取当前日期,获取昨天日期

//获取今天    FunGetNowDate: function () {        var myDate, myDateStr;        myDate = new Date();        var yyyy = myDate.getFullYear();//取四位年份            var MM = myDate.getMonth() + 1;//

2016-10-12 16:02:43 586

原创 jquery 滚动条回到顶部

window.scrollTo(0, 1); }

2016-09-30 10:39:32 320

原创 保留小数点3位数

+ "" + result.d[i].DL.toFixed(3) + ""

2016-09-20 14:44:59 387

原创 移动端html5 添加点击效果

//添加点击效果    FunDJXG: function (o) {        o.on("touchstart", function () {            $(this).addClass("clickResponse");        });        o.on("touchend", function () {            $(this

2016-09-20 11:13:49 1317

转载 HTML5实战与剖析之触摸事件(touchstart、touchmove和touchend)

HTML5实战与剖析之触摸事件(touchstart、touchmove和touchend)HTML5中新添加了很多事件,但是由于他们的兼容问题不是很理想,应用实战性不是太强,所以在这里基本省略,咱们只分享应用广泛兼容不错的事件,日后随着兼容情况提升以后再陆续添加分享。今天为大家介绍的事件主要是触摸事件:touchstart、touchmove和touchend

2016-09-20 11:10:13 217

转载 unix时间戳 工具转换

Unix时间戳(Unix timestamp)转换工具 - 站长工具  http://tool.chinaz.com/Tools/unixtime.aspx

2016-09-08 14:07:05 396

原创 jquery 判断文本框为空 或为null 或 过滤空格

function isNullObj(obj){if(obj==null){return true; }else if(obj.replace(/\s*/g,"")==""){return true; }else{return false; }  }

2016-08-09 14:18:22 3701

原创 ASP.Net 跨域跳转域名 使用jquery ajax请求

解释思路:(一) 假设思路:a:8884/login.html登录选择不同服务器在url带参数[wyh]跳转 到 b:8885/login.html取出url参数[wyh],判断参数[wyh]是否有,如果wyh不等于null,说明存在,然后把wyh存储到b:8885网站的cookie里面,后跳转到b:8885/index.html里,b:8885/index.html页面进行验证判

2016-08-06 15:16:42 1311

原创 jquery 定时器 每隔15秒调用函数

var Baojing= {    BJ_Time: null,  //调用定时器变量    intTime:15,    //请求数据    FunQqbjxx2: function () {        console.log(获取数据);    },    FunBJTime: function () {        console.log(111);

2016-07-16 15:46:08 8381

原创 jquery时间转换 时间戳转换 ,jquery 开始时间必须小于结束时间判断,jquery时间判断 。

//时间判断        if (start == "" || end == "") {            alert("请输入开始和结束时间");            $("#StartTime").focus();            return;        } else {            //判断开始时间必须小于结束时间         

2016-07-16 09:37:53 710 1

原创 jquery 时间戳转成日期格式 , 后台返回时间格式(后台没有进行时间格式转换) ,前端转换成日期格式显示。

  //时间戳转成日期格式 getLocalTime: function (date) { //拿到后台返回时间格式数据如: date = Date(1467873650000)/ //替换掉“ /Date()/ ” 拿到str = 1467873650000 var str = date.replace("/Date(", "...

2016-07-12 10:21:18 949

原创 Jquery判断复选框 input type = checkbox 全部选中 ;全部不选中;其中不选中 则 全部就不能被选中;

//全部选中 过滤报警信息设置    $("#AllChecked").click(function () {        if ($('#AllChecked').is(':checked')) {            $('.Set_check2').prop('checked', true);            $("input[name='Checked']").v

2016-07-08 11:11:51 1937

转载 响应式手机折叠面板

带缓冲效果的仿QQ面板折叠菜单代码function $G(Read_Id) {return document.getElementById(Read_Id);}function Effect(ObjectId,parentId){ var Obj_Display = $G(ObjectId).style.display; if (Obj_Display ==

2016-07-06 13:53:58 797

转载 jquery判断checked的三种方法解释:

jquery判断checked的三种方法:.attr('checked):   //看版本1.6+返回:”checked”或”undefined” ;1.5-返回:true或false.prop('checked'): //16+:true/false.is(':checked'):    //所有版本:true/false//别忘记冒号哦jquery赋值checked的几种写法:

2016-07-06 11:20:26 265

转载 百度地图画出区域并获取区域坐标范围 收藏版

源码:      "Content-Type" content="text/html; charset=utf-8" />  "viewport" content="initial-scale=1.0, user-scalable=no" />  "text/css">  body, html{width: 100%;height: 100%;overflow:

2016-07-01 14:41:18 3169

翻译 邮箱发送

2016-06-21 15:46:02 205

转载 jquery代码实现通用选项卡特效功能

jquery代码实现通用选项卡特效功能2013-12-06 swimly web前端页面开发jquery功能代码部分主要以下3点:1、设置选择当前点击项,添加.on类,并选择同级元素,删除.on类2、定义index变量 ,获取当前点击的li在.menu li这个选择器选择到的li中的位置3、.main 下面的 div中索引位置等于index的

2016-06-21 15:35:00 909

转载 使用正则表达式 讲解

什么是正则表达式从概念上来说,正则表达式也是一门小巧而精炼的语言,它可以用来简化检索特定的字符串,替换特定字符等功能,有许多开发语言工具,都内嵌支持正则表达式。那么一个正则表达式,究竟是什么?其实它就是一个字符串,但这个字符串具有特定含义。基础语法字面值所谓字面值,就是没有任何转义,查找的对象就是其本身,比如正则表达式 abc ,查找的结果就是返回要查找字符

2016-05-30 11:35:06 299

转载 判断浏览器

--[if IE]> script type="text/javascript"> alert("ie") script> ![endif]--> --[if IE 6]> script type="text/javascript"> alert("ie6") script> ![endif]--> --[if IE 7]> script type="text/javas

2016-05-16 14:58:07 212

转载 [jQuery] Cannot read property ‘msie’ of undefined jQuery 1.9不支持 $.browser

最近把一个项目的jQuery升级到最新版,发现有些页面报错Cannot read property ‘msie’ of undefined。上jQuery网站上搜了一下,原因是$.browser这个api从jQuery1.9开始就正式废除,js代码里只要用到$.browser就会报这个错。具体说明参见jQuery官方说明。撸主顺便扩展阅读了一下,发现jQuery 1.9把所有在之前版本里标

2016-05-16 14:05:03 247

转载 jquery的 live()方法, 为什么总是提示不是一个function 错误信息

发现有些页面报错Cannot read property ‘msie’ of undefined。上jQuery网站上搜了一下,原因是$.browser这个api从jQuery1.9开始就正式废除,js代码里只要用到$.browser就会报这个错。具体说明参见jQuery官方说明。下面是具体的解决方法,先下载最新的jQuery Migrate插件,然后在引用jQuery js的地方之后

2016-05-16 13:51:57 770

原创 jquery 10分钟 倒计时

var  ZC4 = { second: 600,//倒计时总秒数量    dsq: null,    // 停止定时器    FunStopInter: function () {        clearInterval(ZC4.dsq);        ZC4.dsq = null;        $('#countdown4').html("");

2016-05-09 11:18:52 1627

jquery实现 复选框 选中和不选中 美化复选框

jquery实现 复选框 选中和不选中 美化复选框

2017-04-27

js 兼容性好导出excel

js 兼容性好导出excel,浏览器全兼容

2016-12-07

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除