7705273183

                    canvas = document.querySelector("canvas");
                    html2canvas(document.querySelector("#content"), {canvas: canvas}).then(function (canvas) {
                        var filename;
                        var myData = new Date(); 
                        var times = myData.getTime();
                        filename = times + '.png';
                        var base64pic = canvas.toDataURL("image/png");
                        base64pic = base64pic.replace('data:image/png;base64,', "");
                        trans.saveImage({
                            base64Str: base64pic,
                            album: true,
                            imgPath:"fs:/fandian/",
                            imgName: filename
                        }, function(ret, err) {  
                            if (ret.status) { 
                                showTips('保存成功');
                            }
                        });
                    })

(289) 422-6759


  /**
   * @param select_id 选择器id
   * @param t_date 限制日期
   * @param type 1:max,2:min,3:初始化时间
   * 使用时请确保framework7.min.js在api.js之前
   */
  function select_time(select_id, t_date, type, closePicker, openPicker) {
      var limit_date_arr = [];
      if(t_date != undefined && t_date != '') {
          limit_date_arr = t_date.split('-');
      }

      var myApp = new Framework7({
          statusbarOverlay: false
      });
      var today = new Date();
      / 初始化年月日
      var select_years = [],
          select_month = [],
          select_day = [];
      var now_year = today.getFullYear();
      for (var i = now_year + 100; i > 1900; i--) {
          if(type == 1 && i > limit_date_arr[0]) {
              continue;
          }
          if(type == 2 && i < limit_date_arr[0]) {
              continue;
          }
          select_years.push(i);
      }
      var now_month = today.getMonth() + 1;
      for (var i = 12; i > 0; i--) {
          if(type == 1 && i > limit_date_arr[1]) {
              continue;
          }
          if(type == 2 && i < limit_date_arr[1]) {
              continue;
          }
          select_month.push(i);
      }
      var now_day = today.getDate();

      function mGetDate(year, month) {
          var d = new Date(year, month, 0);
          return d.getDate();
      }
      for (var i = mGetDate(now_year, now_month); i > 0; i--) {
          if(type == 1 && i > limit_date_arr[2]) {
              continue;
          }
          if(type == 2 && i < limit_date_arr[2]) {
              continue;
          }
          select_day.push(i);
      }

      / 年月日联动 / Framework7 picker
      var pickerLocation = myApp.picker({
          input: select_id,
          rotateEffect: true,
          formatValue: function(picker, values) {
              return values[0] + '-' + values[1] + '-' + values[2];
          },
          toolbarTemplate: '<div class="toolbar">\
                              <div class="toolbar-inner">\
                                  <div class="left">\
                                      <a href="#" class="link close-picker">取消</a>\
                                  </div>\
                                  <div class="right">\
                                      <a href="#" class="link close-picker">完成</a>\
                                  </div>\
                              </div>\
                          </div>',
          cols: [{
              cssClass: 'f-s-14',
              width: '33.33%',
              textAlign: 'center',
              values: select_years,
              onChange: function(picker, select_years) {
                  if (picker.cols[2].replaceValues) {
                      now_year = select_years;
                      var select_day = [];
                      for (var i = 12; i > 0; i--) {
                          if(type == 1 && i > limit_date_arr[1] && now_year == limit_date_arr[0]) {
                              continue;
                          }
                          if(type == 2 && i < limit_date_arr[1] && now_year == limit_date_arr[0]) {
                              continue;
                          }
                          select_day.push(i);
                      }
                      picker.cols[2].replaceValues(select_day);
                  }
                  if (picker.cols[4].replaceValues) {
                      now_year = select_years;
                      var select_day = [];
                      for (var i = mGetDate(select_years, now_month); i > 0; i--) {
                          if(type == 1 && i > limit_date_arr[2] && now_year == limit_date_arr[0] && now_month == limit_date_arr[1]) {
                              continue;
                          }
                          if(type == 2 && i < limit_date_arr[2] && now_year == limit_date_arr[0] && now_month == limit_date_arr[1]) {
                              continue;
                          }
                          select_day.push(i);
                      }
                      picker.cols[4].replaceValues(select_day);
                  }
              }
          }, {
              divider: true,
              content: 'å¹´'
          }, {
              cssClass: 'f-s-14',
              width: '33.33%',
              textAlign: 'center',
              values: select_month,
              onChange: function(picker, select_month) {
                  if (picker.cols[4].replaceValues) {
                      now_month = select_month;
                      var select_day = [];
                      for (var i = mGetDate(now_year, select_month); i > 0; i--) {
                          if(type == 1 && i > limit_date_arr[2] && now_year == limit_date_arr[0] && now_month == limit_date_arr[1]) {
                              continue;
                          }
                          if(type == 2 && i < limit_date_arr[2] && now_year == limit_date_arr[0] && now_month == limit_date_arr[1]) {
                              continue;
                          }
                          select_day.push(i);
                      }
                      picker.cols[4].replaceValues(select_day);
                  }
              }
          }, {
              divider: true,
              content: '月'
          }, {
              cssClass: 'f-s-14',
              width: '33.33%',
              textAlign: 'center',
              values: select_day,
          }, {
              divider: true,
              content: '日'
          }],
          onOpen: function(p) {
            if(type != undefined && type != '') {
                p.setValue([limit_date_arr[0],limit_date_arr[1],limit_date_arr[2]]);
            } else {
                p.setValue([now_year,now_month,now_day]);
            }
            if(openPicker != undefined)
                openPicker(p);
          },
          onClose: function(p) {
            if(closePicker != undefined)
              closePicker(p);
          }
      });
  }

$(document).on("click",function(e){})在apple移动设备上却无法触发

今天在测试的时候发现,动态生成元素的点击事件$(document).on("click",function(){})在andriod设备和电脑浏览器模拟上可以触发,而在apple移动设备上却无法触发。

试过很多办法,在元素生成后 再绑定事件,把click改成touch事件,都没有用,最后好不容易百度到了解决办法
解决的方法很巧妙,就是给需要绑定事件的元素添加一个css cursor: pointer 。
selector {
cursor:pointer
}

【JS】百度分享自定义按钮

/在页面中加入文字式分享按钮

/加入另一个按钮式分享按钮

/最后加入一个百度分享公共的js脚本,如果您希望在增加一个侧栏式按钮,可以向下面这样将type设置成slide

【HTML】头部meta的常用写法

<!-- 优先使用 IE 最新版本和 Chrome -->
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
        <!-- 为移动设备添加 viewport -->
        <meta name="viewport" content="width=device-width,initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
        <!-- 添加到主屏后的标题(iOS 6 新增) -->
        <meta name="apple-mobile-web-app-title" content="">
        <!-- 是否启用 WebApp 全屏模式,删除苹果默认的工具栏和菜单栏 -->
        <meta name="apple-mobile-web-app-capable" content="yes"/>
        <!-- 设置苹果工具栏颜色 -->
        <meta name="apple-mobile-web-app-status-bar-style" content="black"/>
        <!-- 添加智能 App 广告条 Smart App Banner(iOS 6+ Safari) -->
        <meta name="apple-itunes-app" content="app-id=myAppStoreID, affiliate-data=myAffiliateData, app-argument=myURL">
        <!-- 忽略页面中的数字识别为电话,忽略email识别 -->
        <meta name="format-detection" content="telphone=no, email=no"/>
        <!--下面三个是清除缓存 微信浏览器缓存严重又无刷新;这个方法调试的时候很方便-->
        <meta http-equiv="Pragma" content="no-cache">
        <meta http-equiv="Cache-Control" content="no-cache">
        <meta http-equiv="Expires" content="0">