0

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

目前我有这个:

<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>

只需单击按钮即可调用,如下所示:

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

所以不是只有一个输入,我怎么能有两个呢?

问候

4

1 回答 1

1

代替mode:'button'使用mode:'blank'

然后,您可以将任何您喜欢的内容放入空白内容- 任意数量的输入。

于 2012-04-23T06:42:58.547 回答