奥罗塞,撒丁岛,意大利 (© EyeEm Mobile GmbH/Getty Images)

Welcom to 评论 - lizhenqiu blog!

    #2034

    作者:广西南宁市
    别人找你办事就是人脉,你找别人办事就是没人
    展开↯

    #2035

    作者:广西南宁市
    人都有尾巴,爬到树上尾巴才露出来。
    展开↯

    #2036

    作者:广西南宁市
    京东模式做大,大家都变成快递员
    文章:成功的故事只能倒叙着讲  发表时间:2016-11-04, 16:17:53  
    展开↯

    #2037

    作者:广西南宁市
    “人工”服务不再人工。
    文章:他不是脾气暴躁,只是不能被打扰  发表时间:2016-11-04, 11:12:00  
    展开↯

    #2038

    作者:广西南宁市
    当别人说「不」或问「为什么」,请用你性感的、带情绪的脑洞回击,「why not」
    文章:他不是脾气暴躁,只是不能被打扰  发表时间:2016-11-04, 11:10:08  
    展开↯

    #2039

    作者:广西南宁市
    确保你不再被叫去做某件事的最好方法就是,在第一次做的时候就搞砸它
    文章:他不是脾气暴躁,只是不能被打扰  发表时间:2016-11-04, 10:47:40  
    展开↯

    #2040

    作者:广西南宁市
    能不能取代是一回事,允许不允许取代是另一回事。这一回事和那一回事总要博弈一番
    文章:他不是脾气暴躁,只是不能被打扰  发表时间:2016-11-04, 10:46:37  
    展开↯

    #2041

    作者:广西南宁市
    存在的是有原因的,消亡也是有原因的。所以说无论网络视频能否代替电视,都是历史的车轮在推动,任何人都不能完全肯定说A或者B,所以,现在任何人下断言都是早的!
    文章:他不是脾气暴躁,只是不能被打扰  发表时间:2016-11-04, 10:46:24  
    展开↯

    #2042

    作者:广西南宁市
    网页滚动条拉到最低端
    $(document).height() == $(window).height() + $(window).scrollTop()
    Run code
    Cut to clipboard

      当网页高度不足浏览器窗口时$(document).height()返回的是$(window).height()
      $("body").height():body可能会有边框,获取的高度会比$(document).height()小;
      $("html").height():在不同的浏览器上获取的高度的意义会有差异,说白了就是浏览器不兼容。
      $(window).height()值有问题,返回的不是浏览器窗口的高度?
      原因:网页没有加上<!DOCTYPE>声明。
      文章:常用html、demo代码  发表时间:2016-11-04, 10:14:50  
      展开↯

      #2043

      作者:广西南宁市
      使用jquery中height()方法获取各种高度大全
      alert($(window).height()); //浏览器当前窗口可视区域高度 alert($(document).height()); //浏览器当前窗口文档的高度 alert($(document.body).height());//浏览器当前窗口文档body的高度 alert($(document.body).outerHeight(true));//浏览器当前窗口文档body的总高度 包括border padding margin alert($(window).width()); //浏览器当前窗口可视区域宽度 alert($(document).width());//浏览器当前窗口文档对象宽度 alert($(document.body).width());//浏览器当前窗口文档body的高度 alert($(document.body).outerWidth(true));//浏览器当前窗口文档body的总宽度 包括border padding margin
      Run code
      Cut to clipboard
        文章:常用html、demo代码  发表时间:2016-11-04, 10:11:19  
        展开↯

        #2044

        作者:北京市
        滚动闪
        原因:滚动固定的时候,原来的菜单导航高度0不在文档流里面,导致文档高度变化变小减去文档流外的后固定导航栏
        文章:他不是脾气暴躁,只是不能被打扰  发表时间:2016-11-04, 00:42:21  
        展开↯

        #2045

        作者:北京市
        Js/Jquery获取input file的文件名
        html代码: <input type="file" name="file" id="file" class="input_text80"></input> js: 方法一:字符串截取 var file = $("#file").val(); var fileName = getFileName(file); function getFileName(o){ var pos=o.lastIndexOf("\\"); return o.substring(pos+1); } 方法二:正则表达式 var file = $("#file").val(); var strFileName=file.replace(/^.+?\\([^\\]+?)(\.[^\.\\]*?)?$/gi,"$1"); //正则表达式获取文件名,不带后缀 var FileExt=file.replace(/.+\./,""); //正则表达式获取后缀
        Run code
        Cut to clipboard
          文章:简洁七牛图床图片上传外链源码  发表时间:2016-11-04, 00:40:41  
          展开↯

          #2046

          作者:北京市
          JavaScript 获取当前时间戳:
          第一种方法:
          var timestamp = Date.parse(new Date()); 结果:1280977330000
          Run code
          Cut to clipboard

            第二种方法:
            var timestamp = (new Date()).valueOf(); 结果:1280977330748
            Run code
            Cut to clipboard

              第三种方法:
              var timestamp=new Date().getTime(); 结果:1280977330748
              Run code
              Cut to clipboard


                第一种:获取的时间戳是把毫秒改成000显示,
                第二种和第三种是获取了当前毫秒的时间戳。
                文章:简洁七牛图床图片上传外链源码  发表时间:2016-11-04, 00:39:00  
                展开↯

                #2047

                作者:北京市
                七牛自定义资源下载名
                http://qiniuphotos.qiniudn.com/gogopher.jpg?download/test.jpg
                Run code
                Cut to clipboard
                  文章:简洁七牛图床图片上传外链源码  发表时间:2016-11-04, 00:37:15  
                  展开↯

                  #2048

                  作者:北京市
                  公盘网盘上传代码
                  <?php require_once 'vendor/autoload.php'; header('Access-Control-Allow-Origin:*'); use Qiniu\Auth; $bucket = 'wailian'; $accessKey = ''; $secretKey = ''; $auth = new Auth($accessKey, $secretKey); //$upToken = $auth->uploadToken($bucket); $policy = array( 'returnUrl' => 'http://pan.lizhenqiu.com/fileinfo.php', 'returnBody' => '{"fname": $(key)}', ); $upToken = $auth->uploadToken($bucket, null, 3600, $policy); ?><!DOCTYPE html> <html> <head> <title>公盘 -lizhenqiu.com</title> <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" /> <meta name="apple-mobile-web-app-capable" content="yes" /> <meta name="apple-mobile-web-app-status-bar-style" content="black" /> <meta name="format-detection" content="telephone=no" /> <script type="text/javascript" src="http://apps.bdimg.com/libs/jquery/1.9.0/jquery.min.js"></script> <script type="text/ecmascript" src="md5.js"></script> <style>@supports (display:none) { dot { display: inline-block; width: 3ch; text-indent: -1ch; vertical-align: bottom; overflow: hidden; animation: dot 3s infinite step-start both; /* 等宽字体很重要 */ font-family: Consolas, Monaco, monospace; } } @keyframes dot { 33% { text-indent: 0; } 66% { text-indent: -2ch; } }</style></head> <body> <p>请填写标题、简介、选择要上传的RAR文件包</p> <div id="ddimgupoloing" style="display:none;color: red;">正在上传文件<dot>...</dot></div> <form id="myform" autocomplete="off" name="myform" onsubmit="return check();" method="post" action="http://up.qiniu.com" enctype="multipart/form-data"> <input name="key" id="key" type="hidden" value=""> <input name="token" type="hidden" value="<?php echo $upToken;?>"> <p><input name="title" type="text" autocomplete="off" id="intitle" placeholder="请填写标题" /></p> <p><input name="jianjie" type="text" autocomplete="off" id="injianjie" placeholder="请填写简介" /></p> <p><input name="file" autocomplete="off" id="f" type="file" style=" background: #eee; border: 1px solid #eee; border-right: 1px solid #000; " /></p> <input type="submit" value="Submit" style="display:none;" /> </form><script type="text/javascript"> function asq(title,jianjie,durl,types){ $.ajax( { url: '/up.php?title='+title+'&jianjie='+jianjie+'&durl='+durl+'&types='+types, //这里是静态页的地址 type: "GET", //静态页用get方法,否则服务器会抛出405错误 //dataType: "json", //cache: false, //async: false, beforeSend: function(){ // Handle the beforeSend event }, success: function(data){ //var result = $(data).find("另一个html页面的指定的一部分").html(); return true; } }); return false; } function check(){ var s=$('#f').val(); var injianjie=$('#injianjie').val(); var intitle=$('#intitle').val(); if(!intitle){ //alert('请填写标题'); //location.href = '/out.php'; var strFileName=s.replace(/^.+?\\([^\\]+?)(\.[^\.\\]*?)?$/gi,"$1"); $('#intitle').val(strFileName); timedMsg(); return false; } if(!injianjie){ //alert('请填写简介'); var strFileName=s.replace(/^.+?\\([^\\]+?)(\.[^\.\\]*?)?$/gi,"$1"); $('#injianjie').val(strFileName); timedMsg(); //location.href = '/out.php'; return false; } var types=selectFile(document.getElementById("f")); //alert(s); var h=$('#key').val(); if(!s || h) return false; var timestamp = Date.parse(new Date()); var hash = hex_md5(s)+timestamp; $('#key').val(hash); asq(intitle,injianjie,hash,types); } function selectFile(input) { var fileName = input.value; if(fileName.length > 1 && fileName ) { var ldot = fileName.lastIndexOf("."); var type = fileName.substring(ldot + 1); return type; if(type != "rar") { alert('请上传rar压缩包文件'); location.href = '/out.php'; //清除当前所选文件 input.outerHTML=input.outerHTML.replace(/(value=\").+\"/i,"$1\""); return false; } } return false; //return true; } function timedMsg()   { var s=$('#f').val(); if(s){ check(); var h=$('#key').val(); if(h){ $('#myform').css('display','none'); $('#ddimgupoloing').css('display',''); document.getElementById("myform").submit(); } return false; }   setTimeout("timedMsg()",1000);   } setTimeout("timedMsg()",3000); </script> <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> <!-- blog --> <ins class="adsbygoogle" style="display:inline-block;width:320px;height:100px" data-ad-client="ca-pub-7446801070784593" data-ad-slot="7895142255"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> </body> </html>
                  Run code
                  Cut to clipboard
                    文章:简洁七牛图床图片上传外链源码  发表时间:2016-11-04, 00:36:02  
                    展开↯

                    #2049

                    作者:广西南宁市
                    在七牛回调的中,是否有返回文件大小属性。属性是什么
                    上传策略的callbackBody字段设置fsize这个魔法变量即可:
                    http://developer.qiniu.com/docs/v6/api/overview/up/response/vars.html#magicvar

                    php的话就是生成token的地方
                    $bucket = Config::BUCKET_NAME; $accessKey = Config::ACCESS_KEY; $secretKey = Config::SECRET_KEY; $auth = new Auth($accessKey, $secretKey); $policy = array( 'callbackUrl' => 'http://172.30.251.210/callback.php', 'callbackBody' => '{"fname":"$(fname)","fsize":"$(fsize)","fkey":"$(key)","desc":"$(x:desc)","uid":' . $uid . '}' ); $upToken = $auth->uploadToken($bucket, null, 3600, $policy); header('Access-Control-Allow-Origin:*'); echo $upToken;
                    Run code
                    Cut to clipboard
                      文章:简洁七牛图床图片上传外链源码  发表时间:2016-11-03, 17:51:23  
                      展开↯

                      #2050

                      作者:广西南宁市
                      a链接点击执行js代码
                      <a href="javascript: alert('test');">
                      Run code
                      Cut to clipboard
                        文章:常用html、demo代码  发表时间:2016-11-03, 17:49:55  
                        展开↯

                        #2051

                        作者:广西南宁市
                        有人问我为什么每天一上班就犯困想睡觉...或许是因为,工作是梦开始的地方吧
                        文章:他不是脾气暴躁,只是不能被打扰  发表时间:2016-11-03, 14:23:17  
                        展开↯

                        #2052

                        作者:广西南宁市
                        百度地图手机移动端版 天材医疗器械联系我们
                        <script type="text/javascript" src="http://api.map.baidu.com/api?type=quick&ak=X8u8xx9GzO88EIydfLbTsvbK&v=1.0"></script> <!---------------------------------- 地图开始 ----------------------------------> <div class="lxfsditu" id="map" style="border:1px solid #ccc; width:15rem; height:11.85rem;"> </div> <!---------------------------------- 地图结束 ----------------------------------> <script type="text/javascript"> // 百度地图API功能 var map = new BMap.Map("map"); map.centerAndZoom(new BMap.Point(108.312475,22.772913), 14); map.addControl(new BMap.ZoomControl()); //添加地图缩放控件 var marker1 = new BMap.Marker(new BMap.Point(108.312475,22.772913)); //创建标注 map.addOverlay(marker1); // 将标注添加到地图中 //创建信息窗口 var infoWindow1 = new BMap.InfoWindow("广西天材医疗器械有限公司<br>南宁市金凯路11号荣港城二期12座16楼E号"); marker1.addEventListener("click", function(){this.openInfoWindow(infoWindow1);}); </script>
                        Run code
                        Cut to clipboard
                          文章:百度地图显示多个标注点  发表时间:2016-11-02, 18:03:50  
                          展开↯
                          你好,残忍屏蔽广告

                          确定要清除编辑框内容吗?

                          该删除操作将不可恢复。

                          删除 取消

                          激活Windows

                          转到"设置"以激活Windows。