具有两个输入的jQuery Mobile SimpleDialog? [英] jQuery Mobile SimpleDialog with two Inputs?

查看:105
本文介绍了具有两个输入的jQuery Mobile SimpleDialog?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在移动网站上使用jQuery Mobile SimpleDialog(http://dev.jtsage.com/jQM-SimpleDialog/),但我不太了解如何使用多个输入来实现它.

I am using the jQuery Mobile SimpleDialog (http://dev.jtsage.com/jQM-SimpleDialog/) on a mobile site and I don't quite understand how I could go about implementing it with multiple inputs.

目前我有这个:

<script type="text/javascript">
        $(function() {
            // $('#createlocation').remove();
        });
        $(document).delegate('#searchdialog', 'click', function() {
          $('<div>').simpledialog2({
            mode: 'button',
            headerText: 'Route Search',
            headerClose: true,
            buttonPrompt: 'Enter your search:',
            buttonInput: true,
            buttons : {
              'OK': {
                click: function () { 
                  alert($.mobile.sdLastInput);
                }
              },
            }
          })
        });
    </script>

只需按一下按钮即可调用哪个,如下所示:

Which is just called from a button click as follows:

<a href="#page1" id="searchdialog" data-theme="" data-icon="search">
                            Search Routes
                        </a>

所以我不仅要有一个输入,还应该有两个输入吗?

So instead of having just one input, how could I have two?

致谢

推荐答案

而不是 mode:'button',请使用

Instead of mode:'button' use mode:'blank'

然后,您可以将任意内容放入空白内容中-任意数量的输入.

Then you can put whatever you like into blankcontent - as many inputs as you want.

这篇关于具有两个输入的jQuery Mobile SimpleDialog?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆