$(document).ready(function() {
$('#password').attr('type', 'text');
$('#password').val('Password');
});
This should change the #password
input field (with id="password"
) of type
password
normal text field and then fill in the text " Password
".
It does not work. Why?
Here is the form:
<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>