<small id='3mVxT'></small><noframes id='3mVxT'>

    <i id='3mVxT'><tr id='3mVxT'><dt id='3mVxT'><q id='3mVxT'><span id='3mVxT'><b id='3mVxT'><form id='3mVxT'><ins id='3mVxT'></ins><ul id='3mVxT'></ul><sub id='3mVxT'></sub></form><legend id='3mVxT'></legend><bdo id='3mVxT'><pre id='3mVxT'><center id='3mVxT'></center></pre></bdo></b><th id='3mVxT'></th></span></q></dt></tr></i><div id='3mVxT'><tfoot id='3mVxT'></tfoot><dl id='3mVxT'><fieldset id='3mVxT'></fieldset></dl></div>

      <tfoot id='3mVxT'></tfoot>
      • <bdo id='3mVxT'></bdo><ul id='3mVxT'></ul>

    1. <legend id='3mVxT'><style id='3mVxT'><dir id='3mVxT'><q id='3mVxT'></q></dir></style></legend>
      1. layui点击图片实现预览功能

        layui点击图片实现预览功能,要怎么实现呢? HTML内使用代码: img src="..." alt="..." width="200px" height="200px" class="layui-upload-img" onclick="previewImg(this)" JS代码部分: function previewImg(obj) { var img = new Image(); img.src = obj
          <tfoot id='Otvst'></tfoot>
          1. <small id='Otvst'></small><noframes id='Otvst'>

                <legend id='Otvst'><style id='Otvst'><dir id='Otvst'><q id='Otvst'></q></dir></style></legend>
              • <i id='Otvst'><tr id='Otvst'><dt id='Otvst'><q id='Otvst'><span id='Otvst'><b id='Otvst'><form id='Otvst'><ins id='Otvst'></ins><ul id='Otvst'></ul><sub id='Otvst'></sub></form><legend id='Otvst'></legend><bdo id='Otvst'><pre id='Otvst'><center id='Otvst'></center></pre></bdo></b><th id='Otvst'></th></span></q></dt></tr></i><div id='Otvst'><tfoot id='Otvst'></tfoot><dl id='Otvst'><fieldset id='Otvst'></fieldset></dl></div>

                  <tbody id='Otvst'></tbody>

                  <bdo id='Otvst'></bdo><ul id='Otvst'></ul>
                • layui点击图片实现预览功能,要怎么实现呢?

                  HTML内使用代码:
                  <img src="..." alt="..." width="200px" height="200px" class="layui-upload-img" onclick="previewImg(this)">
                  
                  JS代码部分:
                   function previewImg(obj) {
                          var img = new Image();
                          img.src = obj.src;
                          var height=img.height,width=img.width;
                          if(img.height > 600) {
                              height = '600px';
                              width=(600/(img.height))*(img.width);
                          }
                      
                          var imgHtml = "<img src='" + obj.src + "' height='"+height+"' width='"+width+"' />";
                          //弹出层
                          layer.open({
                              type: 1,
                              offset: 'auto',
                              area: [width,'auto'],
                              shadeClose:true,//点击外围关闭弹窗
                              scrollbar: false,//不现实滚动条
                              title: "图片预览", //不显示标题
                              content: imgHtml, //捕获的元素,注意:最好该指定的元素要存放在body最外层,否则可能被其它的相对元素所影响
                              cancel: function () {
                                 
                              }
                          });
                      }
                  
                   
                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  实例代码如下: !DOCTYPE htmlhtml lang="en" head meta charset="utf-8" link rel="stylesheet" href="layui/css/layui.css" style type="text/css" .container{ width: 420px; height: 320px; min-height: 320px; max-height: 320px; position: absolute; t
                  layui实现带清除按钮的输入框,首先html文件如下: !DOCTYPE htmlhtmlhead meta charset="utf-8" meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" title测试 - layui/title link rel="stylesheet" href="layui/css/lay
                  input file上传图片设置的实例代码 div纯input与type/div input type="file" div指明需要图片/div input type="file" accept='image/*' div指明需要多张图片/div input type="file" multiple accept='image/*' div指明调用摄像头获取图片/div input type="fil
                  $base64为图片的编码字符串 preg_match('/^(data:\s*image\/(\w+);base64,)/', $base64, $result);$type = $result[2]; //获取图片的类型jpg png等$name = ”xxxx".".$type; //图片重命名$savepath = ‘C:/'.$name; //图片保存目录file_put_contents($savepat
                  创建容器 xm-select-demo,选择容器 隐藏赋值取值表单; div id="selected_box" class="layui-input-inline xm-select-demo" style="width:150px;"input type="hidden" id="poi_category_id"/div 异步获取代码 //获取分类; $.ajax({ type: 'get', url: "./ap
                  可以根据table的数据实现判断toolbar按钮的显示状态和情况 script type="text/html" id="barDemo" {{# if(d.status ==0){ }} a class="layui-btn layui-btn-mini" lay-event="examine"查看/a a class="layui-btn layui-btn-mini" lay-event="edit"编辑/a a cl

                    <small id='tp1Bc'></small><noframes id='tp1Bc'>

                    <i id='tp1Bc'><tr id='tp1Bc'><dt id='tp1Bc'><q id='tp1Bc'><span id='tp1Bc'><b id='tp1Bc'><form id='tp1Bc'><ins id='tp1Bc'></ins><ul id='tp1Bc'></ul><sub id='tp1Bc'></sub></form><legend id='tp1Bc'></legend><bdo id='tp1Bc'><pre id='tp1Bc'><center id='tp1Bc'></center></pre></bdo></b><th id='tp1Bc'></th></span></q></dt></tr></i><div id='tp1Bc'><tfoot id='tp1Bc'></tfoot><dl id='tp1Bc'><fieldset id='tp1Bc'></fieldset></dl></div>

                        <tbody id='tp1Bc'></tbody>

                        <bdo id='tp1Bc'></bdo><ul id='tp1Bc'></ul>
                          <legend id='tp1Bc'><style id='tp1Bc'><dir id='tp1Bc'><q id='tp1Bc'></q></dir></style></legend>

                          • <tfoot id='tp1Bc'></tfoot>