随笔分类 - jquery
1
摘要:下面的这段代码,是可以将时间戳转为时间,或者将时间戳转为时间: <script type="text/javascript"> $.extend({ myTime:{ CurTime: function(){ return Date.parse(new Date())/1000; }, DateTo
阅读全文
摘要:function pushHistory() { var state = {}; state = { // title: "itGrade", 自定义参数:自定义参数 }; console.log(state); window.history.pushState(state, null, "#");
阅读全文
摘要:function titleLength(str) { var strLength = 0; var list = str.split(""); for (var i = 0; i < list.length; i++) { if (str.charCodeAt(i) > 0 && str.char
阅读全文
摘要:手机端适配不同手机高度 ,把内容居中显示,可以将div、img、section、span、p等等元素,设置 top:50%; margin-top:xxvw; 这样可以保证主题内容居中显示。
阅读全文
摘要:1、使用phaser世界生成img 然后保存img在某个div中,长按这个div就会生成海报(其实就是图片的保存,只是因为h5中的背景啊、文字啊需要根据选择来显示,所以就是定制生成图片也就是海报了) <style> #poster{width: 100vw;height: 100vh;positio
阅读全文
摘要:1、音乐自动播放 <section class="music rotate hide"> <audio loop src="/static/diseasesGame/video/2.mp3" id="audio_play" autoplay preload></audio> </section> $
阅读全文
摘要:参考 https://www.cnblogs.com/houdj/p/7002650.html
阅读全文
摘要:plupload文件上传插件 plupload 说明文档 http://www.phpin.net/tools/plupload/ 参考样例 http://www.jq22.com/jquery-info14953 我自己用的比较简单
阅读全文
摘要:1、php+html+jquery 问题描述:页面点击没有反应,换手机换设备都不行(大部分人没问题就少数人有问题,) 思路:查看php日志,如果没有报错的话,那么说明就是页面上出现了错误。这时候,就查看页面报错信息。(自己遇到的是微信端某个用户点击一个活动都没有反应,换设备也不行。通过微信开发工具,
阅读全文
摘要:主要借助 百度开发的开源的echarts.js插件,挺好用的。(自行查看官网) https://www.echartsjs.com/examples/zh/index.html#chart-type-bar 在官网实例上部分没有在对应的图形上面显示数据,所以记录下:
阅读全文
摘要:<section class="music rotate"> <audio loop src="/static/wishChina/music1.mp3" id="audio_play" autoplay preload></audio> </section> //下面为jquery处理,加载完成,则调用该方法,播放音乐 function audioAutoPlay(id) { var audio
阅读全文
摘要:$('.pushJie').on('touchstart',touchStartFun).on('touchmove',touchmoveFun).on('touchend',touchendFun); function touchStartFun(e){ e.preventDefault(); touchStartX = e.originalEvent.cha...
阅读全文
摘要:<script type="text/javascript"> var serverTime = <?php echo time();?> * 1000; var gotobuy=0,gotopay=0; var timeout=null; $(function(){ var dateTime = new Date(); var difference = dateTime.getTime() -
阅读全文
摘要:index 即为 class=on 在ul下的下标
阅读全文
摘要:href = '223d啥啥啥d dds word sss 1233;var indexOf = href.indexOf('word');len = href.substring(indexOf,href.length);(包括指定字符串) var newHref = href.replace(l
阅读全文
摘要:其实我要找的是前端提交表单后,php怎么通过输入的js来调用原页面中的js函数,然后无意就看到这个,之前也是有遇到额,顺便收藏下。 原:http://blog.csdn.net/smilefyx/article/details/49332433
阅读全文
摘要:最近做项目用到这个bootstrap,然后其实也没有做很深的研究,就是能大概知道怎么用。 然后在学习中,很关键的就是你要去看源代码,只有看懂了这个,你才知道说怎么调用,然后你以后可以怎么做。 下面试我从别的博主那copy过来的,以后可以参考,只有是bootstrap中的table的一些节点的。 下面
阅读全文
摘要:通过ajax向后台请求数据 服务器处理 前台处理
阅读全文
摘要:css样式 html前端 后台数据处理 说明:后台我用的是thinkphp框架
阅读全文
1

浙公网安备 33010602011771号