c# - 如何使用jquery进行更多控制?

标签 c# javascript jquery asp.net jquery-ui

我在页面中有一个文本框的时间选择器,我想将其用于此页面中的更多文本框?!

<小时/>
<head>
<script type="text/javascript">
    $(document).ready(function () {
        $('#example8', '#TextBox1').timepicker({
            ampm: true                
        });
    });
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
    <input type="text" name="example8" id="example8" value="" />
</div>    
</form>
</body>

最佳答案

你可以做这样的事情

        <script type="text/javascript">
            $(document).ready(function () {
                $('.needstimepicker').timepicker({
                    ampm: true                
                });
            });
        </script>



        <div>
            <input type="text" class="needstimepicker" name="example8" id="example8" value="" />
            <input type="text" class="needstimepicker" name="example8" id="example9" value="" />
            <input type="text" class="needstimepicker" name="example8" id="example10" value="" />
        </div> 

关于c# - 如何使用jquery进行更多控制?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6142794/

相关文章:

c# - 三个平面的交点 3D - C#

javascript - 通过 'new' 给一个对象多个属性?

javascript - Node JS 逗号赋值

javascript - 处理主干中的移动屏幕方向

c# - 如何解析字符串数组的JSON数组

c# - SubSonic:TableColumn 的 MaxLength(超出)

javascript - 如何使用 jquery 将 &lt;input type ="text"> 更改为 <tr>

javascript - 过滤 JSON 以仅包含所需的值

jquery - Internet Explorer 9 和 jQuery 2.2.1

c# - 多个左连接的 LINQ 方法语法