$(document).ready(function() {
    // #login-box password field
    $('#password').attr('type', 'text');
    $('#password').val('Password');
});
这应该更改正常文本字段的#password输入字段(with id="password"),type password然后填写文本"Password".
但它不起作用.为什么?
这是表格:
<form enctype="application/x-www-form-urlencoded" method="post" action="/auth/sign-in">
  <ol>
    <li>
      <div class="element">
        <input type="text" name="username" id="username" value="Prihlasovacie meno" class="input-text" />
      </div>
    </li>
    <li>
      <div class="element">
        <input type="password" name="password" id="password" value="" class="input-text" />
      </div>
    </li>
    <li class="button">
      <div class="button">
        <input type="submit" name="sign_in" id="sign_in" value="Prihlási?" class="input-submit" />
      </div>
    </li>
  </ol>
</form>
ActiveAdmin 文档解释了如何禁用分页并使用 来设置资源索引中每页的记录数config.per_page,但我想知道是否有一种内置方法允许用户per_page自己设置值,例如使用下拉列表?
settings pagination ruby-on-rails activeadmin drop-down-menu
我正在使用p:password标签进行注册.我想在选中复选框时将字段切换为文本,当取消选中时,它将更改为密码类型模式.如何解决primefaces组件的问题.我正在使用primefaces 3.0和jsf 2.0.
可能重复:
jQuery更改输入类型
如何使用jQuery替换输入[type = submit]以输入[type = text]?
这种方式不起作用:
$('input[type=submit]').removeAttr('type').attr('type','text');
javascript ×3
jquery ×2
activeadmin ×1
html ×1
html-input ×1
input ×1
jsf ×1
jsf-2 ×1
pagination ×1
primefaces ×1
settings ×1