Sử dụng đoạn code sau để thay đổi trạng thái trường input type="submit", nó hỗ trợ trên tất cả các trình duyệt IE, Chrome, Firefox, ...

 

 

<script type="text/javascript">
function pwdFocus() {
$('#fakepassword').hide();
$('#password').show();
$('#password').focus();
}
function pwdBlur() {
if ($('#password').attr('value') == '') {
$('#password').hide();
$('#fakepassword').show();
}
}
</script>

<form method="POST" action="member_login.php">
<input type="hidden" value="" name="spring-security-redirect">
<ul>
<li>
<input type="text" name="username" style="width: 150px;color:gray;"

value="Your email" onfocus="if(this.value=='Your email'){this.value=''};"

onblur="if(this.value==''){this.value='Your email'};" />
</li>
<li>

<input style="width: 150px;color: gray" type="text" name="fakepassword"

id="fakepassword" value="Password" onfocus="pwdFocus()" />
<input style="display: none;width: 150px;color: gray" type="password"

name="password" id="password" value="" onblur="pwdBlur()" />
</li>
<li><button id="login" name="submit" value="Login">Login</button>
<a href="/member_forgot_pass.php" title="Forgotten your details?">Forgotten your details?</a></li>
</ul>
</form>

 

Add comment


Security code
Refresh

thiet ke web chuan w3c

Dịch vụ seo website

seo website