• <small id='qIR3h'></small><noframes id='qIR3h'>

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

    1. <tfoot id='qIR3h'></tfoot>

        • <bdo id='qIR3h'></bdo><ul id='qIR3h'></ul>

      1. 当它是程序的第一行时,JS 错误“重新声明"var?

        时间:2024-04-20
      2. <legend id='1iKMn'><style id='1iKMn'><dir id='1iKMn'><q id='1iKMn'></q></dir></style></legend>

              <tbody id='1iKMn'></tbody>
              <bdo id='1iKMn'></bdo><ul id='1iKMn'></ul>

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

                • 本文介绍了当它是程序的第一行时,JS 错误“重新声明"var?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  SCRPT5039:重新声明 const 属性行 1 字符 1

                  line1: var editObj = null;

                  这是文件的开头,我检查以确保该变量不在任何其他被调用的 js 文件中.是说我以后重新声明吗?(如果是这样,那行参考没有用)或者这有什么问题?

                  This is the beginning of the file and I checked to make sure that variable is not in any other js files being called. Is it saying that I redeclare it later? (if so that line reference is not useful) or what is wrong with this?

                  推荐答案

                  已修复.反正对我来说.我在重新声明错误之前得到了这个错误:

                  Fixed it. For me, anyway. I got this error before the redeclaration error:

                  HTML1113: Document mode restart from Quirks to IE9 Standards 
                  

                  这表明 IE 发现了它认为的错误,因此以 Quirks 模式再次加载页面.加载页面两次使它认为所有内容都被声明了两次.所以解决办法就是找出IE不喜欢的东西.

                  This suggests that IE finds what it thinks is an error, so loads the page again in Quirks mode. Loading the page twice makes it think everything is declared twice. So the solution is to find what IE didn't like.

                  首先,我通过 在线 HTML 验证器 运行该页面.接下来我通过 jsLint 运行我的 javascript.毕竟,IE9 看起来很开心.作为奖励,我有更好的代码质量.我希望.

                  First I ran the page through the online HTML validator. Next I ran my javascript through jsLint. After all that, IE9 seemed happy. And as a bonus I have better quality code. I hope.

                  这篇关于当它是程序的第一行时,JS 错误“重新声明"var?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:使用 eval() 定义 const 变量 下一篇:如果我使用 const,为什么 JSHint 会发出警告?

                  相关文章

                  • <bdo id='B5Sv2'></bdo><ul id='B5Sv2'></ul>

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

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

                    <legend id='B5Sv2'><style id='B5Sv2'><dir id='B5Sv2'><q id='B5Sv2'></q></dir></style></legend>