通用部分:
<script>
     MY_FUNCTION = (function() {
        var upSheet = document.createElement('div');
        upSheet.setAttribute('style', 'display:none;position:absolute;left:0px;top:0px;z-index: 9999;');
        upSheet.style.width = document.documentElement.clientWidth + 'px';
        upSheet.style.height = document.documentElement.clientHeight + 'px';

        var sheet = document.createElement('div');
        sheet.setAttribute('style', 'display:block;width:100%;min-height:0px;position:absolute;left:0px;bottom:0px;z-index:10000;');
        upSheet.appendChild(sheet);
        document.body.appendChild(upSheet);
       return {
         scope : null,
         showUpSheet : function(o) {
           this.scope = o.scope;
           this.item=o.item;        
           sheet.innerHTML = o.template;
           upSheet.style.display = 'block';
         },
         hideUpSheet : function() {
           sheet.innerHTML = '';
           upSheet.style.display = 'none';
         }
       };
    })();
  </script>


调用部分:
$scope.showUpSheet = function() {
      MY_FUNCTION.showUpSheet({
        template: document.getElementById('templates/sheet.html').innerHTML
      });
    }

html部分:
<script >
    11111111111
  </div>
</script>

相关文章:

  • 2021-12-05
  • 2021-09-24
  • 2021-06-22
  • 2022-01-01
  • 2021-08-18
  • 2022-12-23
  • 2022-02-09
  • 2021-06-10
猜你喜欢
  • 2022-12-23
  • 2021-06-26
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-26
相关资源
相似解决方案