随笔分类 -  js ,jq

摘要:var tip_index = 0; $(document).on('mouseenter', '.layer_hover', function(){ var words = $(this).data('words'); tip_index = layer.tips(words, '.layer_hover', {time: 0}); }).on('mouseleave', '.layer_hov 阅读全文
posted @ 2019-09-27 15:47 盘思动 阅读(5633) 评论(1) 推荐(0) 编辑
摘要:$("#form_title").ajaxSubmit({ //页面生成的html 中含有表单提交表单方式 dataType: "json", success : function(obj){ lock_flag = false; if(obj.errno == 0){ lock_flag = fa 阅读全文
posted @ 2019-08-17 13:34 盘思动 阅读(420) 评论(1) 推荐(0) 编辑
摘要:// 把多少秒 转化为 时分秒: 类似倒计时! function timestampToDate(ctime){ let returnStr = ''; // 天数位 // let day = Math.floor(ctime / 3600 / 24); // let dayStr = day.toString(); // if (dayStr.leng... 阅读全文
posted @ 2019-07-26 16:22 盘思动 阅读(1355) 评论(0) 推荐(0) 编辑
摘要:使用Number()函数可以解决这个问题,如下 var c = Number(a) + Number(b) 这样c得出来的解果是3, 阅读全文
posted @ 2019-07-16 22:44 盘思动 阅读(147) 评论(0) 推荐(0) 编辑
摘要:获取(代码): 1 ("#img")[0].src; // 测试无效 修改(代码): 1("#img").attr('src',path); 阅读全文
posted @ 2019-07-05 21:35 盘思动 阅读(366) 评论(0) 推荐(0) 编辑
摘要:$(document).on('click','#submit_title_btn',function(){ var title = $("#title").val(); if (!title) { // 添加 dealText('#title','请输入题目内容'); ... 阅读全文
posted @ 2019-04-13 10:41 盘思动 阅读(3759) 评论(0) 推荐(0) 编辑
摘要:delivery_show(); $('.delivery_btn').on('click',function(){ delivery_show(); }); function delivery_show() { var delivery_type_val = $("input[n... 阅读全文
posted @ 2019-02-19 17:03 盘思动 阅读(357) 评论(0) 推荐(0) 编辑
摘要:$(document).on('click','#getcode',function(){ var tel = ('#tel').val(); var _this =('#getcode'); var _this_html = _this.html(); const numreg = /^\d/; const reg = /^1[3|4|5|6|7... 阅读全文
posted @ 2019-01-05 16:42 盘思动 阅读(204) 评论(0) 推荐(0) 编辑
摘要:$(".good_info").on('click',function () { var id = $(this).data('id'); var string = 'http://qr.liantu.com/api.php?text=https://hostname/wx.php/Good/det 阅读全文
posted @ 2018-06-20 20:36 盘思动 阅读(141) 评论(0) 推荐(0) 编辑
摘要:/(^[1-9]\d*(\.\d{1,2})?)|(0(\.\d1,2)?)/ var reg = /(^[1-9]\d*(\.\d{1,2})?)|(0(\.\d1,2)?)/; if (!price){ alert("请输入订单价格"); return; } if (!reg 阅读全文
posted @ 2018-04-25 21:14 盘思动 阅读(138) 评论(0) 推荐(0) 编辑
摘要:function timestampToTime(timestamp) { var date = new Date(timestamp * 1000);//时间戳为10位需*1000,时间戳为13位的话不需乘1000 Y = date.getFullYear() + '-'; M = (date.g 阅读全文
posted @ 2018-04-20 22:13 盘思动 阅读(8005) 评论(0) 推荐(0) 编辑
摘要:var A = {a:1,b:2,c:3,d:"hello world"}; for(var k in A) { console.log(k,A[k]); var h = new EJS({element:'ejs_render_id'}).render(render); } return; 阅读全文
posted @ 2018-04-03 14:22 盘思动 阅读(1816) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2018-03-31 14:38 盘思动 阅读(32723) 评论(0) 推荐(0) 编辑
摘要:默认tips层几秒后自动关闭。请问如何实现类似页面层时,点击页面层外部遮罩手动关闭的效果?下面我加了time: 20000 时间控制在20秒后自动关闭,但是显得比较呆板,不如用户手动点击关闭来的灵活。 阅读全文
posted @ 2018-03-06 11:17 盘思动 阅读(2382) 评论(0) 推荐(0) 编辑
摘要:if(_each_this_type_name == 'post_num'){ var patrn = /^[a-zA-Z0-9]{3,12}$/; if(!patrn.test(_each_this_val)){ alert(_each_this_name + "没填写或格式错误"); direct_btn = false; _each_t... 阅读全文
posted @ 2018-02-10 20:56 盘思动 阅读(221) 评论(0) 推荐(0) 编辑
摘要:$("input[type='text']").each(function(){ if($(this).data('parent_id')){ var _each_this_parent_id = parseInt($(this).data('parent_id')); if(_each_this_parent_id != ... 阅读全文
posted @ 2018-02-10 18:46 盘思动 阅读(286) 评论(0) 推荐(0) 编辑
摘要:var radio_checked_array = []; $("input[type='radio']").each(function(){ if($(this).attr('checked') == 'checked'){ var _each_this_val = parseInt($(this).val()); ... 阅读全文
posted @ 2018-02-10 17:44 盘思动 阅读(1018) 评论(0) 推荐(0) 编辑
摘要:("input[name=approve]:checked").val()//radio;varradiocheckedval=("#form_step_1_ejs_append_id input[name='1']:checked").val();//这个判断语句, 阅读全文
posted @ 2018-02-10 17:16 盘思动 阅读(2413) 评论(0) 推荐(0) 编辑
摘要:$('.main_div').each(function(){ product_id = parseInt((this).data(id));productnum=parseInt((this).data('num')); productList_array.productList.push({"productId":pro... 阅读全文
posted @ 2018-02-07 11:10 盘思动 阅读(131) 评论(0) 推荐(0) 编辑
摘要:<div class="every_content last_place" data-order_id="2"> <p style="line-height: 40px;">已支付</p> //line-height 是数据处理之后的代码............ <p style="line-hei 阅读全文
posted @ 2018-01-25 19:48 盘思动 阅读(177) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示