| 
	织梦Dedecms默认模板内容页评论处有个不足的地方,就是用户登录之后还会出现那个提示用户登录的框子,天涯这里给出了以下解决方案,如果喜欢的朋友可以拿去。 
	首先我们给内容页模板写上一段JS脚本代码,通过AJAX来判断用户是否登录,从其中提取用户登录信息,JS代码如下,将其插入到之间。 
	JS代码: 
	<script language="javascript" src="{dede:global name='cfg_cmspath'/}/"></script> <script language="javascript"> function CheckUser(){ var taget_obj = document.getElementById('_userboxform'); myajax = new DedeAjax(taget_obj,false,false,"","",""); myajax.SendGet2("{dede:global name="cfg_memberurl"/}/userboxsta.php"); DedeXHTTP = null; } </script> 
	然后我们修改下内容页部分的代码 
	找到: 
	<div class="userbox"> <dl> <dd class="mtop"> <strong>用户名:</strong><input name="username" class="username" type="text" maxlength="20" /> <strong>密码:</strong><input name="pwd" class="password" type="password" maxlength="20" /> </dd> 
	将其修改为 
	<div class="userbox"> <dl> <dd class="mtop"> <span id="_userboxform"> <strong>用户名:</strong><input name="username" class="username" type="text" maxlength="20" /> <strong>密码:</strong><input name="pwd" class="password" type="password" maxlength="20" /> </span> </dd> 
	即加上,用于判断用户是否已经登录。 
	下面我们来写一个PHP文件,用户传送数据,将其保存为/member/userboxsta.php,其代码如下: 
	<?php header("Pragma:no-cache\r\n"); header("Cache-Control:no-cache\r\n"); header("Expires:0\r\n"); header("Content-Type: text/html; charset=gb2312"); (责任编辑:最模板) | 



 蓝色中英繁三语全静态S
							人气:343
							蓝色中英繁三语全静态S
							人气:343
						 爱之谷成人模板|ECSHOP仿爱
							人气:1019
							爱之谷成人模板|ECSHOP仿爱
							人气:1019
						 Leo Shopping英文时尚饰品母
							人气:331
							Leo Shopping英文时尚饰品母
							人气:331
						 ecshop仿爱之谷成人用品商
							人气:1491
							ecshop仿爱之谷成人用品商
							人气:1491
						 ecshop仿oppo整站模板2015版
							人气:999
							ecshop仿oppo整站模板2015版
							人气:999
						 ecshop仿京东2012最新模板
							人气:4646
							ecshop仿京东2012最新模板
							人气:4646