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

<tfoot id='C4zTM'></tfoot>

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

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

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

      3. OnClick 與 OnClientClick 的 asp:CheckBox?

        OnClick vs OnClientClick for an asp:CheckBox?(OnClick 與 OnClientClick 的 asp:CheckBox?)

            <tbody id='FozFV'></tbody>

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

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

                  本文介紹了OnClick 與 OnClientClick 的 asp:CheckBox?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  限時送ChatGPT賬號..

                  有誰知道為什么 asp:CheckBox 的客戶端 javascript 處理程序需要是 OnClick="" 屬性而不是 OnClientClick="" 屬性,就像 asp:Button 一樣?

                  Does anyone know why a client-side javascript handler for asp:CheckBox needs to be an OnClick="" attribute rather than an OnClientClick="" attribute, as for asp:Button?

                  例如,這是有效的:

                  <asp:CheckBox runat="server" OnClick="alert(this.checked);" />
                  

                  這沒有(沒有錯誤):

                  <asp:CheckBox runat="server" OnClientClick="alert(this.checked);" />
                  

                  但這有效:

                  <asp:Button runat="server" OnClientClick="alert('Hi');" />
                  

                  這不是(編譯時錯誤):

                  and this doesn't (compile time error):

                  <asp:Button runat="server" OnClick="alert('hi');" />
                  

                  (我知道 Button.OnClick 的用途;我想知道為什么 CheckBox 不能以同樣的方式工作......)

                  (I know what Button.OnClick is for; I'm wondering why CheckBox doesn't work the same way...)

                  推薦答案

                  這很奇怪.我檢查了 CheckBox 文檔頁面,上面寫著p>

                  That is very weird. I checked the CheckBox documentation page which reads

                  <asp:CheckBox id="CheckBox1" 
                       AutoPostBack="True|False"
                       Text="Label"
                       TextAlign="Right|Left"
                       Checked="True|False"
                       OnCheckedChanged="OnCheckedChangedMethod"
                       runat="server"/>
                  

                  如您所見,沒有定義 OnClick 或 OnClientClick 屬性.

                  As you can see, there is no OnClick or OnClientClick attributes defined.

                  記住這一點,我認為這就是正在發生的事情.

                  Keeping this in mind, I think this is what is happening.

                  當你這樣做時,

                  <asp:CheckBox runat="server" OnClick="alert(this.checked);" />
                  

                  ASP.NET 不會修改 OnClick 屬性并將其呈現在瀏覽器上.它將被呈現為:

                  ASP.NET doesn't modify the OnClick attribute and renders it as is on the browser. It would be rendered as:

                    <input type="checkbox" OnClick="alert(this.checked);" />
                  

                  顯然,瀏覽器可以理解OnClick"并發出警報.

                  Obviously, a browser can understand 'OnClick' and puts an alert.

                  在這種情況下

                  <asp:CheckBox runat="server" OnClientClick="alert(this.checked);" />
                  

                  同樣,ASP.NET 不會更改 OnClientClick 屬性并將其呈現為

                  Again, ASP.NET won't change the OnClientClick attribute and will render it as

                  <input type="checkbox" OnClientClick="alert(this.checked);" />
                  

                  由于瀏覽器無法理解 OnClientClick,因此不會發生任何事情.它也不會引發任何錯誤,因為它只是另一個屬性.

                  As browser won't understand OnClientClick nothing will happen. It also won't raise any error as it is just another attribute.

                  您可以通過查看呈現的 HTML 來確認上述內容.

                  You can confirm above by looking at the rendered HTML.

                  是的,這根本不直觀.

                  這篇關于OnClick 與 OnClientClick 的 asp:CheckBox?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

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

                  相關文檔推薦

                  Deleting a directory when clicked on a hyperlink with JAvascript.ASP.NET C#(單擊帶有 JAvascript.ASP.NET C# 的超鏈接時刪除目錄)
                  asp.net listview highlight row on click(asp.net listview 在單擊時突出顯示行)
                  Calling A Button OnClick from a function(從函數調用按鈕 OnClick)
                  ASP.net C# Gridview ButtonField onclick event(ASP.net C# Gridview ButtonField onclick 事件)
                  Adding OnClick event to ASP.NET control(將 OnClick 事件添加到 ASP.NET 控件)
                  Multiple submit Button click problem?(多個提交按鈕點擊問題?)
                  1. <i id='BBkx5'><tr id='BBkx5'><dt id='BBkx5'><q id='BBkx5'><span id='BBkx5'><b id='BBkx5'><form id='BBkx5'><ins id='BBkx5'></ins><ul id='BBkx5'></ul><sub id='BBkx5'></sub></form><legend id='BBkx5'></legend><bdo id='BBkx5'><pre id='BBkx5'><center id='BBkx5'></center></pre></bdo></b><th id='BBkx5'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='BBkx5'><tfoot id='BBkx5'></tfoot><dl id='BBkx5'><fieldset id='BBkx5'></fieldset></dl></div>

                  2. <legend id='BBkx5'><style id='BBkx5'><dir id='BBkx5'><q id='BBkx5'></q></dir></style></legend>
                      <tbody id='BBkx5'></tbody>

                          <bdo id='BBkx5'></bdo><ul id='BBkx5'></ul>
                          <tfoot id='BBkx5'></tfoot>

                          1. <small id='BBkx5'></small><noframes id='BBkx5'>

                          2. 主站蜘蛛池模板: 黄色毛片免费视频 | 色视频在线观看 | 国产日韩欧美在线 | 久久91av | 亚洲不卡在线观看 | 国产日韩精品视频 | 中文字幕乱码一区二区三区 | 国产乱码精品一区二区三区中文 | 中文字幕一区二区三区在线观看 | 久久中文字幕电影 | 黑人精品欧美一区二区蜜桃 | 天天操夜夜爽 | 伊人狠狠干 | 免费黄色的视频 | 免费黄色的网站 | 在线观看黄色电影 | 色综合色综合 | 亚洲欧美一区二区三区国产精品 | 美国一级黄色片 | 国产成人精品网站 | 日本在线黄色 | 亚洲欧美国产毛片在线 | 成人片网址 | 亚洲黄色高清视频 | 久久久久久精 | 91av视频在线 | 高清久久 | 欧美三级三级三级爽爽爽 | 欧美一级片在线看 | 中文日韩在线 | 亚洲精品乱码久久久久久蜜桃91 | 欧美精品成人 | 国产一区二区在线免费观看 | 国产精品精品 | 天天草天天干天天 | 久久久蜜桃 | 激情一区 | 黄色大片免费看 | 欧美aaa级 | 亚洲一本 | 国产成人精品一区二 |