JQuery .Show() doesn't work with server control?

前端 未结 3 1253
陌清茗
陌清茗 2021-01-16 08:29

I have 2 html TR that i make them runat=\"server\" & visible=\"false\" and I have a dropdownlist called citiesDropDownList

<
相关标签:
3条回答
  • 2021-01-16 09:01

    If you set visible = "false" on a server control, then the control is not even rendered to the browser. Set display: none instead and then show the control with display: block in your javascript.

    0 讨论(0)
  • 2021-01-16 09:08

    Remove the visible=false from the server control as this stops the control being rendered to the page, either set a CSS style with display: none or hide the required controls in javascript.

    0 讨论(0)
  • 2021-01-16 09:10

    visible="false" means it doesn't even get rendered into the page, so your selectors aren't finding any elements.

    Instead of visible="false" use style="display: none;" to hide the elements, yet still render them in the page.

    0 讨论(0)
提交回复
热议问题