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

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

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

  • <legend id='KmPy3'><style id='KmPy3'><dir id='KmPy3'><q id='KmPy3'></q></dir></style></legend>

      1. 由于文本框 onblur 事件中的警報框導致按鈕單擊事

        button click event lost due to the alert box in text box onblur event(由于文本框 onblur 事件中的警報框導致按鈕單擊事件丟失)
        <legend id='QEmw2'><style id='QEmw2'><dir id='QEmw2'><q id='QEmw2'></q></dir></style></legend>
        <i id='QEmw2'><tr id='QEmw2'><dt id='QEmw2'><q id='QEmw2'><span id='QEmw2'><b id='QEmw2'><form id='QEmw2'><ins id='QEmw2'></ins><ul id='QEmw2'></ul><sub id='QEmw2'></sub></form><legend id='QEmw2'></legend><bdo id='QEmw2'><pre id='QEmw2'><center id='QEmw2'></center></pre></bdo></b><th id='QEmw2'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='QEmw2'><tfoot id='QEmw2'></tfoot><dl id='QEmw2'><fieldset id='QEmw2'></fieldset></dl></div>
          <tfoot id='QEmw2'></tfoot>

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

                <tbody id='QEmw2'></tbody>

                • <bdo id='QEmw2'></bdo><ul id='QEmw2'></ul>
                  本文介紹了由于文本框 onblur 事件中的警報框導致按鈕單擊事件丟失的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我創建了一個簡單的 Web 表單,其中包含一個文本框和一個按鈕.我已經捕捉到了文本框的onblur事件.

                  I have created a simple web form, containing one text box and one button. I have captured the onblur event of the text box.

                  <html xmlns="http://www.w3.org/1999/xhtml" >  
                  <head runat="server">  
                      <title>Untitled Page</title>  
                      <script language="javascript" type="text/javascript">  
                      function onTextBoxBlur()  
                      {  
                          alert("On blur");  
                          return true;  
                      }  
                      </script>  
                  </head>  
                  <body>  
                      <form id="form1" runat="server">  
                      <asp:TextBox ID="TextBox1" runat="server" onblur="onTextBoxBlur();"></asp:TextBox>  
                      <asp:Button ID="Button1" runat="server" Text="Button" />  
                  </form>  
                  </body>  
                  </html>
                  

                  當我在文本框中輸入一些值并單擊按鈕時,會發生文本框的 onblur 事件,但不會發生按鈕的 onclick 事件.而且,當我從 js 函數中刪除警報框時,它工作正常.按鈕單擊事件的某些方式丟失了.我認為這是由于警報框.知道為什么會這樣嗎?

                  When I enter some value in text box and click on the button, then the onblur event of textbox occurs, but the onclick of the button doesn't. And, when I remove the alert box from the js function then it works fine. Some how the button click is event is lost. I think it is due to the alert box. Any idea why is this so?

                  推薦答案

                  一個按鈕的點擊"有兩個部分,鼠標向下和鼠標向上.當您將鼠標放在按鈕上時,它會獲得焦點 - 模糊文本框并觸發警報.由于警報對話框是模態的,它們會暫停頁面上的所有活動,因此按鈕不會檢測到鼠標向上并且您的點擊不會完成.

                  A "click" of a button has two parts, mouse down and mouse up. When you mouse down on the button, it gains focus - blurring the text box and firing your alert. Since alert dialogs are modal, they halt all activity on the page so the button doesn't detect the mouse up and your click doesn't complete.

                  可以使用模糊事件中的計時器解決您的問題,并在按鈕的 mousedown 事件中取消該計時器:

                  It could be possible to work around your issue using a timer within the blur event, and cancelling that timer within the mousedown event of the button:

                  var timer;
                  function onTextBoxBlur()  
                  {  
                      timer = window.setTimeout(function () { alert("On blur"); }, 0);  
                      return true;  
                  }  
                  
                  function onButtonMouseDown()
                  {
                      clearTimeout(timer);
                  }
                  

                  這篇關于由于文本框 onblur 事件中的警報框導致按鈕單擊事件丟失的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

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

                  相關文檔推薦

                  Check if a polygon point is inside another in leaflet(檢查一個多邊形點是否在傳單中的另一個內部)
                  Changing leaflet markercluster icon color, inheriting the rest of the default CSS properties(更改傳單標記群集圖標顏色,繼承其余默認 CSS 屬性)
                  Trigger click on leaflet marker(觸發點擊傳單標記)
                  How can I change the default loading tile color in LeafletJS?(如何更改 LeafletJS 中的默認加載磁貼顏色?)
                  Adding Leaflet layer control to sidebar(將 Leaflet 圖層控件添加到側邊欄)
                  Leaflet - get latitude and longitude of a marker inside a pop-up(Leaflet - 在彈出窗口中獲取標記的緯度和經度)

                    <small id='5P3wI'></small><noframes id='5P3wI'>

                  • <tfoot id='5P3wI'></tfoot>

                      <legend id='5P3wI'><style id='5P3wI'><dir id='5P3wI'><q id='5P3wI'></q></dir></style></legend>

                          <bdo id='5P3wI'></bdo><ul id='5P3wI'></ul>
                            <tbody id='5P3wI'></tbody>

                          • <i id='5P3wI'><tr id='5P3wI'><dt id='5P3wI'><q id='5P3wI'><span id='5P3wI'><b id='5P3wI'><form id='5P3wI'><ins id='5P3wI'></ins><ul id='5P3wI'></ul><sub id='5P3wI'></sub></form><legend id='5P3wI'></legend><bdo id='5P3wI'><pre id='5P3wI'><center id='5P3wI'></center></pre></bdo></b><th id='5P3wI'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='5P3wI'><tfoot id='5P3wI'></tfoot><dl id='5P3wI'><fieldset id='5P3wI'></fieldset></dl></div>
                            主站蜘蛛池模板: 亚洲永久免费 | 中文字幕精品一区二区三区精品 | 亚洲 精品 综合 精品 自拍 | av手机免费在线观看 | 天堂中文av | 成人三级av | 涩涩视频在线观看 | 毛片久久久 | 欧美国产在线一区 | 一区二区三区回区在观看免费视频 | 亚洲精品二区 | 国产一区电影 | 欧美一区二区大片 | 日日草夜夜草 | www.99热.com| 久久综合一区二区三区 | 日韩欧美一区二区三区 | 亚洲欧美在线一区 | 中国美女撒尿txxxxx视频 | 日韩欧美中文字幕在线视频 | 不卡视频一区二区三区 | 7799精品视频天天看 | 成人av网站在线观看 | 日韩欧美在线精品 | 免费骚视频| 九九热这里 | 性xxxxx| 伊人久久精品一区二区三区 | www.日本三级 | 日韩美香港a一级毛片免费 国产综合av | 精品伦精品一区二区三区视频 | 午夜一级黄色片 | 国产成人高清成人av片在线看 | 69性欧美高清影院 | 久色网| 91国产精品 | 99久久免费精品视频 | 女朋友的闺蜜3韩国三级 | 蜜臀91视频| 久久精品毛片 | 国产精品毛片av一区 |