久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

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

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

        <legend id='mwm2Q'><style id='mwm2Q'><dir id='mwm2Q'><q id='mwm2Q'></q></dir></style></legend>
      1. <tfoot id='mwm2Q'></tfoot>

      2. <i id='mwm2Q'><tr id='mwm2Q'><dt id='mwm2Q'><q id='mwm2Q'><span id='mwm2Q'><b id='mwm2Q'><form id='mwm2Q'><ins id='mwm2Q'></ins><ul id='mwm2Q'></ul><sub id='mwm2Q'></sub></form><legend id='mwm2Q'></legend><bdo id='mwm2Q'><pre id='mwm2Q'><center id='mwm2Q'></center></pre></bdo></b><th id='mwm2Q'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='mwm2Q'><tfoot id='mwm2Q'></tfoot><dl id='mwm2Q'><fieldset id='mwm2Q'></fieldset></dl></div>

        如何調試通過 AJAX(特別是 jQuery)加載的 Javascript

        How do I debug Javascript which was loaded via AJAX (specifically jQuery)(如何調試通過 AJAX(特別是 jQuery)加載的 Javascript)
          <bdo id='zfvct'></bdo><ul id='zfvct'></ul>

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

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

              <tfoot id='zfvct'></tfoot>
                  <tbody id='zfvct'></tbody>

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

                  本文介紹了如何調試通過 AJAX(特別是 jQuery)加載的 Javascript的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我最近改變了我的編碼風格,使用更復雜的項目來按需"加載頁面(及其嵌入式腳本).但是,很難像加載這些腳本時那樣調試它們:

                  I have changed my coding style with more complex projects to loading pages (And their embedded scripts) "on demand" recently. However, it is difficult to debug those scripts as when they are loaded like:

                  jQuery.get('/myModularPage', function(html){ /* insert the loaded page into the DOM */ });
                  

                  $('#some-container').load('/myOtherPage');
                  

                  這些腳本運行完美,但如果我在調試,如何在這些動態加載的頁面和腳本中設置斷點?

                  These scripts run perfectly, but if I'm debugging, how can I set breakpoints in these dynamically loaded pages and scripts?

                  推薦答案

                  更新

                  接受的表單現在帶有 #(井號)而不是 @(符號)

                  The accepted form is now with a # (hashtag) rather than @ (at symbol)

                  語法已更改以避免與 IE 條件編譯語句沖突和其他一些問題(感謝 Oleksandr Pshenychnyy 和 Varunkumar Nagarajan 指出這一點)

                  The syntax was changed to to avoid conflicts with IE conditional compilation statements and some other issues (thanks to Oleksandr Pshenychnyy and Varunkumar Nagarajan for pointing this out)

                  //#sourceURL=/path/to/file 
                  

                  這實際上可以是任何可以幫助您識別代碼塊的字符串.

                  This can really be any string that helps you identify the block of code.

                  JMac 的另一個優點:

                  An additional good point from JMac:

                  對我來說,js 文件顯示在源列表中組稱為(無域)".可能值得一提,因為我錯過了一開始!

                  For me, the js file was being displayed in the sources list within a group called "(no domain)". Might be worth mentioning as I missed it at first!

                  原創

                  在遇到 這篇文章.它確實非常適合我的開發環境(我寫這篇文章時是 Chrome 22).

                  I struggled with the above for about a week before running across this article. It really does work perfectly for my development environment (Chrome 22 as I write this).

                  Firebug 還支持開發人員命名的 eval() 緩沖區:只需在 eval(expression) 末尾添加一行,例如:

                  Firebug also supports developer-named eval() buffers: just add a line to the end of your eval(expression) like:

                  //@ sourceURL=foo.js
                  

                  例如,給定這個簡單的 html 文檔:

                  For example, given this simple html document:

                  <!DOCTYPE html>
                  <html>
                  <body>
                      <p>My page's content</p>
                      <div id="counter"></div>
                      <script type="text/javascript">
                          //if this page is loaded into the DOM via ajax 
                          //the following code can't be debugged 
                          //(or even browsed in dev-tools)
                  
                          for(i=0;i<10;i+=1) {
                              document.getElementById('counter').innerText = i;
                          }
                  
                          //but if I add the line below
                          //it will "magically" show up in Dev Tools (or Firebug)
                  
                          //@ sourceURL=/path/to/my/ajaxed/page
                      </script>
                  <body>
                  </html>
                  

                  我還沒有發現的東西:

                  • 是否必須為內聯腳本的每個腳本塊執行此操作?
                  • 它必須是腳本塊的最后一行嗎?(這篇文章建議的答案是)

                  這篇關于如何調試通過 AJAX(特別是 jQuery)加載的 Javascript的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  Browser waits for ajax call to complete even after abort has been called (jQuery)(即使在調用 abort (jQuery) 之后,瀏覽器也會等待 ajax 調用完成)
                  JavaScript innerHTML is not working for IE?(JavaScript innerHTML 不適用于 IE?)
                  XMLHttpRequest cannot load, No #39;Access-Control-Allow-Origin#39; header is present on the requested resource(XMLHttpRequest 無法加載,請求的資源上不存在“Access-Control-Allow-Origin標頭) - IT屋-程序員軟件開發技術分
                  Is it possible for XHR HEAD requests to not follow redirects (301 302)(XHR HEAD 請求是否有可能不遵循重定向 (301 302))
                  NETWORK_ERROR: XMLHttpRequest Exception 101(NETWORK_ERROR:XMLHttpRequest 異常 101)
                  XMLHttpRequest 206 Partial Content(XMLHttpRequest 206 部分內容)
                1. <legend id='cV8Lz'><style id='cV8Lz'><dir id='cV8Lz'><q id='cV8Lz'></q></dir></style></legend>

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

                    <tbody id='cV8Lz'></tbody>

                      <tfoot id='cV8Lz'></tfoot>
                      • <bdo id='cV8Lz'></bdo><ul id='cV8Lz'></ul>
                        1. <i id='cV8Lz'><tr id='cV8Lz'><dt id='cV8Lz'><q id='cV8Lz'><span id='cV8Lz'><b id='cV8Lz'><form id='cV8Lz'><ins id='cV8Lz'></ins><ul id='cV8Lz'></ul><sub id='cV8Lz'></sub></form><legend id='cV8Lz'></legend><bdo id='cV8Lz'><pre id='cV8Lz'><center id='cV8Lz'></center></pre></bdo></b><th id='cV8Lz'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='cV8Lz'><tfoot id='cV8Lz'></tfoot><dl id='cV8Lz'><fieldset id='cV8Lz'></fieldset></dl></div>
                            主站蜘蛛池模板: 亚洲一区不卡在线 | 亚洲欧美一区二区三区国产精品 | 久久久精品一区二区 | 蜜月va乱码一区二区三区 | 成人午夜黄色 | 五月花丁香婷婷 | 久久久av | 国产成人精品一区二区三区在线 | 色综合99 | 国产高清免费视频 | 午夜电影网 | 亚洲视频在线看 | 亚洲精品欧美一区二区三区 | 国产精品一区2区 | 中文字幕在线三区 | 91极品尤物在线播放国产 | 成人不卡一区二区 | 国产网站在线免费观看 | 成人三级av | 国产成人免费视频网站高清观看视频 | 青娱乐国产 | 波多野结衣中文视频 | 免费观看毛片 | 国产亚洲精品久久久久久豆腐 | 久久tv在线观看 | 精品国产99 | 成人午夜精品 | 91一区二区| 国产精品美女久久久久aⅴ国产馆 | 日韩视频免费看 | 日本不卡一区二区三区在线观看 | 99re在线视频观看 | 羞羞午夜| 97久久久| 国产精品成人一区 | 视频一区二区三区中文字幕 | 伊人网综合 | 欧美精品久久久久久久久久 | 国产精品99999 | 免费午夜电影 | 午夜久久久久 |