62,046
社区成员
发帖
与我相关
我的任务
分享
<script type="text/javascript">
function getCookie(parameter)
{
var reg,allCookie,allCookie2,iLen,iStart,iEnd;
allCookie = document.cookie;
reg = new RegExp(parameter);
if((allCookie.search(reg) == -1)||(allCookie.indexOf(parameter+"=")<0))
{
return "";
}
else
{
iLen = parameter.length;
iStart = allCookie.search(reg) + iLen +1;
allCookie2 = allCookie.substr(iStart);
iEnd = iStart + allCookie2.search(/;/i);
if((iStart - 1) == iEnd){
return allCookie.substr(iStart);
}
else{
return allCookie.substr(iStart,iEnd - iStart);
}
}
}
var userName = getCookie("activeUserName");
if (userName && userName != "Guest")
{
document.getElementById("login").innerHTML = "<a href='http://passport.csdn.net/logonout.aspx?fromurl=http://www.csdn.net'>[注销]</a>";
document.getElementById("showinfo").innerHTML = "欢迎您<em> "+ userName + "</em><dfn>我的:</dfn><a href='http://hi.csdn.net/my.html' target='_blank'>空间</a><a href='http://job.csdn.net/Con001_ProjectManage/Job/MyResume.aspx' target='_blank'>简历</a><a href='http://writeblog.csdn.net/' target='_blank'>Blog</a><a href='http://wz.csdn.net/my/' target='_blank'>网摘</a><a href='http://club.book.csdn.net/people/myclub.aspx' target='_blank'>书架</a><a href='http://download.csdn.net/user/"+ userName +"' target='_blank'>资源</a><input class='search' size='9' type='text' id='srch1' /><input class='go' onclick=\"javascript:var s1=document.getElementById('srch1');if(s1&&s1.value){window.open('http://so.csdn.net/Default.aspx?q='+encodeURIComponent(s1.value))}else{alert(1);};\" type='button' value='博客搜索' />";
}
</script>