【问题标题】:jQuery Mobile, setting 'Go' button on iPhone keyboard with multiple buttonsjQuery Mobile,在带有多个按钮的 iPhone 键盘上设置“开始”按钮
【发布时间】:2012-02-13 11:22:24
【问题描述】:

我正在使用带有 asp.net 的 jQuery mobile,并且我的搜索表单上有一些按钮。我想要它,所以当用户单击默认情况下出现在 iphone 键盘上的“开始”按钮时,它会选择我的搜索选项。目前它加载最后加载​​的按钮或顶部的按钮。

这是我的html:

<asp:Label ID="lblWhat" CssClass="style=color:Red;" runat="server" Visible="false">Please Enter What you want to search for</asp:Label>
            <label for="what">What:</label>
              <asp:Label ID="lblWhere" CssClass="style=color:Red;" runat="server" Visible="false">Please Enter where you would like to search, or click Use My Location</asp:Label>
            <input type="text" name="what" id="tbWhat" value="" runat="server" placeholder="What" />


                <br />

            <label for="where">Where:</label>
            <input type="text" name="where" id="tbWhere" value="" runat="server" placeholder="Where"/>

               <br />

             <input type="text" name="long" id="tbLong" runat="server" style="visibility: hidden; display: none;" />
              <input type="text" name="long" id="tbLat" runat="server"  style="visibility: hidden; display: none;" /> 

 <script language="javascript" type="text/javascript">  
            if (navigator.geolocation) {  
                document.write('<input type="button" onclick="getLocation()" value="Use My Location" />');
            } else {  

            }  
        </script>

    <input type="button" onclick="clearForm()" value="Clear" /> 
 <br />
            <asp:Button ID="btnAccess" runat="server" Text="Access Requirements" />
            <asp:Button ID="btnSearch" runat="server"  Text="Search" />


       </div>

当按下 Go(或在浏览器中输入)时我想运行的是 btnSearch

汤姆

【问题讨论】:

    标签: jquery asp.net html jquery-mobile


    【解决方案1】:

    我认为这最能回答您的问题; http://weblogs.asp.net/scottgu/archive/2005/08/04/421647.aspx 用于设置默认按钮;例如

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-07-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-09-15
      • 1970-01-01
      相关资源
      最近更新 更多