Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/448.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 在ie9中,模态不从顶部滑动_Javascript_Jquery_Css_Jquery Ui_Twitter Bootstrap - Fatal编程技术网

Javascript 在ie9中,模态不从顶部滑动

Javascript 在ie9中,模态不从顶部滑动,javascript,jquery,css,jquery-ui,twitter-bootstrap,Javascript,Jquery,Css,Jquery Ui,Twitter Bootstrap,单击“登录”或“注册”按钮时,将打开一个模式。。。。 在chrome浏览器中,模式从顶部向下滑动。。。。 在ie9浏览器中,它只是打开了。。。。 如何修复ie 9浏览器中的滑动问题 在下面提供我的代码 $('#myModal').modal({show:false}) &时代; 登录 您包含的javascript文件中至少有几个问题 在部分,您甚至在加载jquery之前就已经包含了bootstrap.js。因为看起来只有在接近页面底部时才会加载jquery。 bootstrap.js需要

单击“登录”或“注册”按钮时,将打开一个模式。。。。 在chrome浏览器中,模式从顶部向下滑动。。。。 在ie9浏览器中,它只是打开了。。。。 如何修复ie 9浏览器中的滑动问题

在下面提供我的代码


$('#myModal').modal({show:false})
&时代;


登录
您包含的javascript文件中至少有几个问题

  • 部分,您甚至在加载jquery之前就已经包含了bootstrap.js。因为看起来只有在接近页面底部时才会加载jquery。 bootstrap.js需要在jquery之后出现

  • 您试图在页面顶部加载bootstrap.js,但路径无效,然后在页面底部加载bootstrap.js中包含的所有引导javascript文件。这里只需要一种方法:使用boostrap.js(放在jquery之后),或者只加载所需的引导插件(同样,放在jquery之后)。在引导站点上查看源代码,看看他们是如何做到的。twitter.github.com/bootstrap/

  • 在头部和底部附近,都是在jquery本身加载之前调用jquery函数,因此如果使用F12打开浏览器控制台,您将看到
    uncaughtreferenceerror:$在Chrome中未定义
    ,而
    SCRIPT5009:'$”在IE9中未定义

  • 除了所有javascript源文件问题外,bootstrap.css文件还有一个无效路径,并且没有加载

  • 我怀疑,一旦您解决了这些问题,您的页面可能会以预期的行为运行;当然,这将是一个良好的开端

        <script type="text/javascript">
          $('#myModal').modal({ show: false })
        </script>
        <script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
    
    
    <div id="myModal" class="modal hide fade" style="width: 427px; height: 226px;">
          <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-hidden="true" >&times;</button>
          </div>
          <div class="modal-body" style="width: 336px;">
    
            <form method="post" class="navbar-form pull-right" action="http://intra.defie.co/Account/">
                  <input class="span2" type="text" name="email" placeholder="Email" style="width: 263px; margin-top: 19px; margin-bottom: 10px;"><br>
                  <input class="span2" type="password" name="password" placeholder="Password" style="width: 263px;"><br>
                  <button type="submit" class="btn" style="margin-top: 13px; margin-left: 100px;">Sign in</button>
                </form>
    
    
    
          </div>
    
        </div>