简体   繁体   English

javascript错误倍增布局

[英]javascript bugs multiplying layouts

I seem to have encountered problem, i do not know the exact cause as my code seem okay 我似乎遇到了问题,我不知道确切原因,因为我的代码似乎没问题

this is the effect of the bug 这是bug的影响

在此输入图像描述

this is my console 这是我的控制台

在此输入图像描述

now here is how my scripts are called 现在这里是我的脚本被调用的方式

 <script src="{{ asset('public/libs/jquery/jquery/dist/jquery.js') }}"> 
 </script>
<!-- Bootstrap -->
<script src="{{ asset('public/libs/jquery/tether/dist/js/tether.min.js') }}"></script>

<script src="{{ asset('public/scripts/config.lazyload.js') }}"></script>

<script src="{{ asset('public/scripts/palette.js') }}"></script>
<script src="{{ asset('public/scripts/ui-load.js') }}"></script>
<script src="{{ asset('public/scripts/ui-jp.js') }}"></script>
<script src="{{ asset('public/scripts/ui-include.js') }}"></script>
<script src="{{ asset('public/scripts/ui-device.js') }}"></script>
<script src="{{ asset('public/scripts/ui-form.js') }}"></script>
<script src="{{ asset('public/scripts/ui-nav.js') }}"></script>
<script src="{{ asset('public/scripts/ui-screenfull.js') }}"></script>
<script src="{{ asset('public/scripts/ui-scroll-to.js') }}"></script>
<script src="{{ asset('public/scripts/ui-toggle-class.js') }}"></script>
<script src="{{ asset('public/libs/notify.js') }}"></script>

 <script src="{{ asset('public/scripts/app.js') }}"></script>

<!-- ajax -->
<script src="{{ asset('public/libs/jquery/jquery-pjax/jquery.pjax.js') }}"></script>
<script src="{{ asset('public/scripts/ajax.js') }}"></script>
<script>
 $.ajaxSetup({
     headers: {
        'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
     }
  });


function initiateNext(){
    var pos = document.getElementById('number').value;
    if(pos == 1){
      //check if email has been entered
      var code = document.getElementById('code-value').value;
      if(code !== ""){
          $.post('check-code', {coder : code}, function(res){
              if(res){
                res = JSON.parse(res);
                if(res.type == 1){
                   document.getElementById('code').style.display = "none";
                  document.getElementById('country').style.display = "block";
                  document.getElementById('number').value = 2;
                  $.notify(res.message, "success");
                }
                // console.log(res)
                if(res.type ==  2){
                  $.notify(res.message, "error");
                }
              }
          });


      } else {
        //throw error
      }
    }

    if(pos == 2){
      //submit detail then enter verification

    }
}
</script>

please take note that I also have a registration page that looks exactly like this but it does not bring this error up. 请注意,我还有一个看起来完全像这样的注册页面,但它不会带来这个错误。 I dont know if anybody has encountered such a problem please point me in the right direction of solving this 我不知道是否有人遇到过这样的问题,请指出我正确的方向解决这个问题

this atribute was missing a file to include 此属性缺少要包含的文件

so I placed a file in between the quotes just like in the other files that werent having this issue 所以我在引号之间放置了一个文件,就像没有出现此问题的其他文件一样

and this solved the problem. 这解决了这个问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM