Skip to content

Instantly share code, notes, and snippets.

@mala mala/gist:139283
Created Jul 2, 2009

Embed
What would you like to do?
<html>
<head>
<title>パスワードをマスクしないでパスワード保存も有効にする</title>
<script type="text/javascript">
function form_submit(event) {
var self = this;
if (this.__submit_by_js) return;
this.elements.password.type='password';
setTimeout(function() {
self.__submit_by_js = true;
self.elements.button.click();
}, 10);
event.stopPropagation();
event.preventDefault();
return false;
}
function password_focus(event) {
this.type="text";
}
function password_blur(event) {
this.type="password";
}
</script>
</head>
<body>
<form method="POST" onsubmit="form_submit.call(this, event);">
<dl>
<dt>ユーザーid</dt>
<dd><input type="text" name="login" value=""></dd>
<dt>パスワード</dt>
<dd>
<input type="password" name="password" value=""
onfocus="password_focus.call(this, event)"
onblur="password_blur.call(this,event)">
</dd>
<input type="submit" name="button">
</form>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.