随笔分类 -  jquery

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

1