JQuery Mobile - 显示内嵌的HTML表单 [英] JQuery Mobile - Display An HTML Form Inline

查看:133
本文介绍了JQuery Mobile - 显示内嵌的HTML表单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

不会显示在同一行上。



我尝试了很多次来显示文本框并在同一行上提交按钮,但它永远不会工作。这里是我的代码和我使用的组合...

 < form method =GETstyle =display:inline嵌段;> 
< input type =textname =idvalue =其他>
< input type =submitdata-type =buttondata-icon =plusvalue =Add>
< / form>

没有用。

 < form method =GET> 
< span>
< input type =textname =idvalue =其他>
< input type =submitdata-type =buttondata-icon =plusvalue =Add>
< / span>
< / form>

这两者都没有。

 < form method =GET> 
< ul style =display:inline; list-style-type:none;>
< li style =display:inline;>< input type =textname =idvalue =Other>< / li>
< li style =display:inline;>< input type =submitdata-type =buttonvalue =Add>< / li>
< / ul>
< / form>

我做错了什么,我该如何实现目标?



感谢并祝圣诞节愉快!

解决方案





HTML:

 < fieldset class =ui-grid-a> 
< div class =ui-block-a>
< input type =textname =idvalue =其他>
< / div>
< div class =ui-block-b>
< input type =submitdata-type =buttondata-icon =plusvalue =Add>
< / div>
< / fieldset>


Goal: Display textbox and submit button on the same line in Jquery Mobile.

Problem: They will not display on the same line.

I've tried many times to display the textbox and submit button on the same line, but it never works. Here is my code and the combinations I used...

<form method="GET" style="display: inline-block;">
     <input type="text" name="id" value="Other">
     <input type="submit" data-type="button" data-icon="plus" value="Add">
</form>

That did not work.

<form method="GET">
   <span>
     <input type="text" name="id" value="Other">
     <input type="submit" data-type="button" data-icon="plus" value="Add">
   </span>
</form>

Neither did this.

<form method="GET">
      <ul style="display: inline; list-style-type: none;">
          <li style="display: inline;"><input type="text" name="id" value="Other"></li>
          <li style="display: inline;"><input type="submit" data-type="button" value="Add"></li>
       </ul>
</form>

What am I doing wrong and how can I achieve my goal?

Thanks and merry Christmas!

解决方案

Would a Grid Layout work?

HTML:

<fieldset class="ui-grid-a">
    <div class="ui-block-a">
            <input type="text" name="id" value="Other">
    </div>
    <div class="ui-block-b">
            <input type="submit" data-type="button" data-icon="plus" value="Add">
    </div>
</fieldset>

这篇关于JQuery Mobile - 显示内嵌的HTML表单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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