标签:style io ar color os 使用 sp java for
加上这个函数:
<SCRIPT LANGUAGE="JavaScript">
function getCookiesPWD() {
document.subform.pwd.style.color=‘#000‘
var password = "";
var cookies = document.cookie.split(";");
//cookies=request.getCookies();
if(cookies!=null){
for(i=0;i<cookies.length;i++){
var aCrumb = cookies[i].split("=");
if ("cookie_tgt" == aCrumb[0])
password = unescape(aCrumb[1]);
document.subform.pwd.value = password;
}
}
}
</script>
表单调用:
<form name="subform" action="loginResult" method="post">
<br/>
<div align="center"><input type="text" name="pwd" value="密码" onclick="getCookiesPWD()" onFocus="getCookiesPWD()" onBlur="if(!value){value=defaultValue;this.style.color=‘#999‘}" style="color:#999; width:200px; height:30px"/></div>
<br/><div align="center"><input type="submit" name="submit" id="btn" value="登录"></div>
</form>
标签:style io ar color os 使用 sp java for
原文地址:http://my.oschina.net/u/1162691/blog/349852