最近一朋友想要实现织梦模板会员登陆横向排列,于是帮助写了下面的代码,加到首页模板中。
首先在 <head> </head> 之间加上
<script language="JavaScript" src="/include/dedeajax2.js"></script>
<script language="javascript" type="text/javascript">
<!--
function cleartext(e) {
e.value='';
e.focus();
}
function CheckLogin(){
var taget_obj = document.getElementById('_loginform');
myajax = new DedeAjax(taget_obj,false,false,"","","");
myajax.SendGet("/member/loginsta.php");
}
//-->
</script>
然后,重新写了首页登陆代码如下:
<span id="_loginform" style="float:left">
<form name='form1' method='POST' action='/member/index_do.php'>
<input type="hidden" name="fmdo" value="login" />
<input type="hidden" name="dopost" value="login" />
<input type="hidden" name="gourl" value="" />
用户名:
<input name="userid" type="text" id="userid" style="width:60px;height:14px;border:1px solid #000" />
密码:
<input type="password" name="pwd" style="width:60px;height:14px;border:1px solid #000" />
验证码:
<input name="vdcode" type="text" id="vdcode" style="width:36px;height:14px;border:1px solid #000" />
<img name="vdcode" src="/include/validateimg.php" width="42" height="18" align="absmiddle" />
<input name="imageField" type="image" src="/templets/img/loginbt.gif" width="42" height="18" border="0" align="absmiddle" />
<a href="/member/index_do.php?fmdo=user&dopost=regnew" target="_blank">注册</a>
</form>
</span>
<script language="JavaScript">CheckLogin();</script>
|
本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!