【问题标题】:I need to show checkboxlist as box below the textbox when user clicks or hover the textbox inside a gridview当用户单击或将文本框悬停在网格视图内时,我需要将复选框列表显示为文本框下方的框
【发布时间】:2013-03-22 12:51:23
【问题描述】:

当用户单击或将文本框悬停在gridview中时,我需要在文本框下方显示复选框列表。如果您遇到类似问题,请提供帮助

【问题讨论】:

  • 你有尝试过什么吗? (提出更好问题的有用链接:How to AskFAQ

标签: jquery asp.net gridview checkboxlist


【解决方案1】:

在脚本中添加这个

 <script type="text/javascript">
           $(document).ready(function () {
              $("#txtbox").click(function () {

                  $("#checkboxDiv").css("display", "block");
              });
          })
 </script>

在 html 中添加这个

<div>
    <input type="text" id="txtbox" name="txtbox"/>
</div>

<div style="display:none" id="checkboxDiv">
  <input type="checkbox" name="vehicle" value="Bike">I have a bike<br>
  <input type="checkbox" name="vehicle" value="Car">I have a car 
</div>

别忘了在你的页面上添加 jquary.min.js

【讨论】:

  • 感谢 Raj 的回复。我在gridview中有我的文本框。单击文本框时,checkboxlist div 应作为一个框打开。
  • 好的,那么你可以通过设置文本框的“clientidmode=static”属性来使用相同的方法...IN .NET
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2014-08-26
  • 2019-03-04
  • 1970-01-01
  • 2014-05-10
  • 1970-01-01
  • 2013-11-02
  • 1970-01-01
相关资源
最近更新 更多