DEDE5.7首页会员横排登录代码
很多做网站的人在做门户资讯网站的时候
下面我们来一步一步修改!
首先在index
<div class="header_top"> <div class="wcenter"> <span class="time" id="time"> <table border=" " align="center" > <tr><td> <div id="_userlogin"> <div class="userlogin"> <form name="userlogin" action="{dede:global cfg_memberurl/}/index_do php" method="POST"> <input type="hidden" name="fmdo" value="login" /> <input type="hidden" name="dopost" value="login" /> <input type="hidden" name="keeptime" value=" " /> <div class="fb">用户名:<input type="text" name="userid" size=" " class="ipt txt" /> 密码:<input type="password" name="pwd" size=" " class="ipt txt" /> 验证码:<input type="text" name="vdcode" size=" " class="ipt txt" /> <img align="center" src="{dede:global cfg_cmsurl/}/include/vdimgck php" /> <button type="submit" class="btn
">登录</button> <a href="{dede:global cfg_memberurl/}/index_do php?fmdo=user& dopost=regnew">注册帐号</a> <a href="{dede:global cfg_memberurl/}/resetpassword php">忘记密码?</a> </form> </div> </div> <! /userlogin > <script language="Javascript" type="text/Javascript">CheckLogin();</script> </td></tr></table> </span> <div class="toplinks"><a href=""onclick="this
style behavior= url(#default#homepage) ; this setHomePage( {dede:global cfg_basehost/} );">设为主页</a> | <a href="Javascript:window external AddFavorite( {dede:global cfg_basehost/} {dede:global cfg_webname /} )">加入收藏</a> | <a href="{dede:global cfg_cmsurl/}/data/sitemap html" target="_blank">网站导航</a> | <a href="联系我们</a></div> </div> </div>
HTML
代码现在我们已经有了CSS
样式完善了/*head */ header{ width: %; width: px; margin:auto; overflow:hidden; } header_top{ height: px!important; height: px; line height: px; color:# ; overflow:hidden; background:url( /images/top_bg gif) repeat x; } center{ margin: px auto; } w { width: px; /*position:relative;*/ } header_top time{ float:left; padding left: px; } header_top toplinks{ float:right; text align:right; } header_top toplinks a{ margin: px; } header top{ clear:both; overflow:hidden; margin top: px; } header title{ float:left; } header title h a{ width: px; height: px; display:block; overflow:hidden; } header banner{ width: px; height: px; float:right; margin left: px; overflow:hidden; } ipt txt{ width: px; border: px #CFCFCF solid; } fb{ color:# ; } btn { background: url(" /images/comm bt gif") no repeat scroll transparent; border: medium none; color: # ; cursor: pointer; height: px; letter spacing: px; line height: px; overflow: hidden; width: px; }
HTML代码和CSS都有了
<script language="Javascript" type="text/Javascript" src="{dede:globalcfg_cmsurl/}/include/dedeajax js"></script> <script language="Javascript" type="text/Javascript"> <! $(function(){ $("a[_for]") mouseover(function(){ $(this) parents() children("a[_for]") removeClass("thisclass") parents() children("dd") hide(); $(this) addClass("thisclass") blur(); $("#"+$(this) attr("_for")) show(); }); $("a[_for=uc_member]") mouseover(); $("a[_for=flink_ ]") mouseover(); }); function CheckLogin(){ var taget_obj = document getElementById( _userlogin ); myajax = new DedeAjax(taget_obj false false ); myajax SendGet ("{dede:global cfg_cmspath/}/member/ajax_loginsta php"); DedeXHTTP = null; } > </script>
现在都全了
下在是CSS中出现的图片
下载地址