如何利用PHP实现QQ秀功能!!~送分100!~~~在线等!~~~分即送!!~ 要配合htmlcss js不是PHP能完成的 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 PHP来做后台。JS做前后,运行下面的代码试试<!-- 在要显示形象预览的地方放置以下这句代码 --><div id="bodyshow" style="border:1px solid #000000;padding:0;POSITION: relative; Left: 0px; TOP: 0px; HEIGHT: 226px; WIDTH: 140px;"></div> <!-- 这是提交表单,把代表用户形象的字符串赋到隐藏域 userequip 提交 --><form name="equipform" method="post" action=""><input name="userequip" type="hidden" value=""> <input name="saveequip" type="submit" value="保存形象" > <input name="toreequip" type="button" value="原始形象" onclick="shoiwit('df>df>df>0');return false;" > </form><script language="JavaScript"><!--var myequip="df>df>df>0"; //最初显示的配置码,可由服务器读取并输出。function shoiwit(equip){ //这个函数由配置码为参数,显示虚拟形象showlayers=equip.split('>'); //以“>”为分隔符,分配各层图片名到一个数组 showlayers[]str="";for(i=0;i<showlayers.length;i++){if(showlayers[i]!='0'&&showlayers[i]!=''){ //如果图片名为0或空值则该层不显示。str+="<img src='http://www.pconline.com.cn/pcedu/redian/code_2003/equipment/"+(i+1)+"/"+showlayers[i]+".gif' style='padding:0;position:absolute;top:0;left:0;width:140;height:226;z-index:"+(i+1)+";'>";}}//最后在最上一层覆盖一幅完全透明的图片,这样用户在上面右链>另存为也只能保存这幅图了:str+="<img src='http://www.pconline.com.cn/pcedu/redian/code_2003/equipment/blank.gif' style='padding:0;position:absolute;top:0;left:0;width:140;height:226;z-index:100;'>";if(equipform.userequip) equipform.userequip.value=myequip=equip; //把配置码赋值到隐藏域中bodyshow.innerHTML=str; //显示各层图片。}//页面加载后先显示最初的虚拟形象:document.body.onload=new Function("shoiwit(myequip)");function dressit(layer,img){ //这个函数用于更换配置,参数为 层数,图片名showlayers=myequip.split('>');newequip="";for(i=0;i<showlayers.length;i++){if(i+1==layer){if(img==showlayers[i]) newequip+="df"; //如果该层已是这幅图片,则恢复为原始图片else newequip+=img; //否则换为这幅图}else newequip+=showlayers[i]; //其他层图片不变if(i+1!=showlayers.length) newequip+=">";}shoiwit(newequip); //显示最新配置}--></script><!--以下是供选图片列表,点击一幅图则更改相应的层的这幅图片注意链接路径,javascript:dressit(4,1) 表示第4层换上/脱下图片"1.gif",依此类推;不过要注意若要第4层换上/脱下图片“df.gif”,则应加引号,写成 javascript:dressit(4,'df')--><table border="0" cellspacing="0" cellpadding="0"><tr> <td width="84"><a href="javascript:dressit(4,1)"><img src="http://www.pconline.com.cn/pcedu/redian/code_2003/equipment/4/1x.gif" width="84" height="84" border="0"></a></td><td width="84"><a href="javascript:dressit(4,2)"><img src="http://www.pconline.com.cn/pcedu/redian/code_2003/equipment/4/2x.gif" width="84" height="84" border="0"></a></td><td width="84"><a href="javascript:dressit(4,3)"><img src="http://www.pconline.com.cn/pcedu/redian/code_2003/equipment/4/3x.gif" width="84" height="84" border="0"></a></td><td width="84"><a href="javascript:dressit(4,4)"><img src="http://www.pconline.com.cn/pcedu/redian/code_2003/equipment/4/4x.gif" width="84" height="84" border="0"></a></td></tr><tr> <td><a href="javascript:dressit(3,1)"><img src="http://www.pconline.com.cn/pcedu/redian/code_2003/equipment/3/1x.gif" width="84" height="84" border="0"></a></td><td><a href="javascript:dressit(3,2)"><img src="http://www.pconline.com.cn/pcedu/redian/code_2003/equipment/3/2x.gif" width="84" height="84" border="0"></a></td><td><a href="javascript:dressit(3,3)"><img src="http://www.pconline.com.cn/pcedu/redian/code_2003/equipment/3/3x.gif" width="84" height="84" border="0"></a></td><td><a href="javascript:dressit(3,4)"><img src="http://www.pconline.com.cn/pcedu/redian/code_2003/equipment/3/4x.gif" width="84" height="84" border="0"></a></td></tr><tr> <td><a href="javascript:dressit(2,1)"><img src="http://www.pconline.com.cn/pcedu/redian/code_2003/equipment/2/1x.gif" width="84" height="84" border="0"></a></td><td><a href="javascript:dressit(2,2)"><img src="http://www.pconline.com.cn/pcedu/redian/code_2003/equipment/2/2x.gif" width="84" height="84" border="0"></a></td><td><a href="javascript:dressit(2,3)"><img src="http://www.pconline.com.cn/pcedu/redian/code_2003/equipment/2/3x.gif" width="84" height="84" border="0"></a></td><td><a href="javascript:dressit(2,4)"><img src="http://www.pconline.com.cn/pcedu/redian/code_2003/equipment/2/4x.gif" width="84" height="84" border="0"></a></td></tr><tr> <td><a href="javascript:dressit(1,1)"><img src="http://www.pconline.com.cn/pcedu/redian/code_2003/equipment/1/1x.gif" width="84" height="84" border="0"></a></td><td><a href="javascript:dressit(1,2)"><img src="http://www.pconline.com.cn/pcedu/redian/code_2003/equipment/1/2x.gif" width="84" height="84" border="0"></a></td><td><a href="javascript:dressit(1,3)"><img src="http://www.pconline.com.cn/pcedu/redian/code_2003/equipment/1/3x.gif" width="84" height="84" border="0"></a></td><td><a href="javascript:dressit(1,4)"><img src="http://www.pconline.com.cn/pcedu/redian/code_2003/equipment/1/4x.gif" width="84" height="84" border="0"></a></td></tr></table> 文章: http://www.pconline.com.cn/pcedu/empolder/wz/javascript/0305/169147.html打包下载: http://arch.pconline.com.cn/pcedu/redian/code_2003/example.rar 只要把前台提交的数据保存到数据库就可以保存形像了 :) goodluck rt nod严重同意楼上... PHP+JS,找这些方面的资料应该可以。 晕,后台进行图片管理前面用css与js进行效果显示就可以了. discuz的一个叫虚拟形象的插件不是用PHP实现的吗?好象也没用到JS呀 discuz的一样用js的,只是拍照那里用了GB库而已! 日期转换问题 CSDN放弃自主开发,个人空间SNS改用PHP版本uchome了,令人遗憾! 刚建立了个邮件服务器 QQ HOTMAIL能收到 163 263收不到 郁闷 smarty中的truncate变量调节器不能对中文正确起作用 这个问题不太懂,来指导一下 在使用MYSQL时,连接不了数据库的服务器,哪位高手帮一下呢? [求助]关于php的session问题 为什么产品图片只显示一半? 求从一个html代码中提取出图片的地址的方法 php 与 sap 接口通信问题 如果图片表里有两张以上的图片,怎样才能只显示一张?其它的可以在详细页显示. 文件上传大小的问题。倾家荡产送分!
<!-- 在要显示形象预览的地方放置以下这句代码 -->
<div id="bodyshow" style="border:1px solid #000000;padding:0;POSITION: relative; Left: 0px; TOP: 0px; HEIGHT: 226px; WIDTH: 140px;"></div>
<!-- 这是提交表单,把代表用户形象的字符串赋到隐藏域 userequip 提交 -->
<form name="equipform" method="post" action="">
<input name="userequip" type="hidden" value="">
<input name="saveequip" type="submit" value="保存形象" >
<input name="toreequip" type="button" value="原始形象" onclick="shoiwit('df>df>df>0');return false;" >
</form><script language="JavaScript">
<!--
var myequip="df>df>df>0"; //最初显示的配置码,可由服务器读取并输出。function shoiwit(equip){ //这个函数由配置码为参数,显示虚拟形象
showlayers=equip.split('>'); //以“>”为分隔符,分配各层图片名到一个数组 showlayers[]
str="";
for(i=0;i<showlayers.length;i++){
if(showlayers[i]!='0'&&showlayers[i]!=''){ //如果图片名为0或空值则该层不显示。
str+="<img src='http://www.pconline.com.cn/pcedu/redian/code_2003/equipment/"+(i+1)+"/"+showlayers[i]+".gif' style='padding:0;position:absolute;top:0;left:0;width:140;height:226;z-index:"+(i+1)+";'>";
}
}
//最后在最上一层覆盖一幅完全透明的图片,这样用户在上面右链>另存为也只能保存这幅图了:
str+="<img src='http://www.pconline.com.cn/pcedu/redian/code_2003/equipment/blank.gif' style='padding:0;position:absolute;top:0;left:0;width:140;height:226;z-index:100;'>";
if(equipform.userequip) equipform.userequip.value=myequip=equip; //把配置码赋值到隐藏域中
bodyshow.innerHTML=str; //显示各层图片。
}
//页面加载后先显示最初的虚拟形象:
document.body.onload=new Function("shoiwit(myequip)");function dressit(layer,img){ //这个函数用于更换配置,参数为 层数,图片名
showlayers=myequip.split('>');
newequip="";
for(i=0;i<showlayers.length;i++){
if(i+1==layer){
if(img==showlayers[i]) newequip+="df"; //如果该层已是这幅图片,则恢复为原始图片
else newequip+=img; //否则换为这幅图
}
else newequip+=showlayers[i]; //其他层图片不变
if(i+1!=showlayers.length) newequip+=">";
}
shoiwit(newequip); //显示最新配置
}-->
</script><!--
以下是供选图片列表,点击一幅图则更改相应的层的这幅图片
注意链接路径,javascript:dressit(4,1) 表示第4层换上/脱下图片"1.gif",依此类推;
不过要注意若要第4层换上/脱下图片“df.gif”,则应加引号,写成 javascript:dressit(4,'df')
-->
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="84"><a href="javascript:dressit(4,1)"><img src="http://www.pconline.com.cn/pcedu/redian/code_2003/equipment/4/1x.gif" width="84" height="84" border="0"></a></td>
<td width="84"><a href="javascript:dressit(4,2)"><img src="http://www.pconline.com.cn/pcedu/redian/code_2003/equipment/4/2x.gif" width="84" height="84" border="0"></a></td>
<td width="84"><a href="javascript:dressit(4,3)"><img src="http://www.pconline.com.cn/pcedu/redian/code_2003/equipment/4/3x.gif" width="84" height="84" border="0"></a></td>
<td width="84"><a href="javascript:dressit(4,4)"><img src="http://www.pconline.com.cn/pcedu/redian/code_2003/equipment/4/4x.gif" width="84" height="84" border="0"></a></td>
</tr>
<tr>
<td><a href="javascript:dressit(3,1)"><img src="http://www.pconline.com.cn/pcedu/redian/code_2003/equipment/3/1x.gif" width="84" height="84" border="0"></a></td>
<td><a href="javascript:dressit(3,2)"><img src="http://www.pconline.com.cn/pcedu/redian/code_2003/equipment/3/2x.gif" width="84" height="84" border="0"></a></td>
<td><a href="javascript:dressit(3,3)"><img src="http://www.pconline.com.cn/pcedu/redian/code_2003/equipment/3/3x.gif" width="84" height="84" border="0"></a></td>
<td><a href="javascript:dressit(3,4)"><img src="http://www.pconline.com.cn/pcedu/redian/code_2003/equipment/3/4x.gif" width="84" height="84" border="0"></a></td>
</tr>
<tr>
<td><a href="javascript:dressit(2,1)"><img src="http://www.pconline.com.cn/pcedu/redian/code_2003/equipment/2/1x.gif" width="84" height="84" border="0"></a></td>
<td><a href="javascript:dressit(2,2)"><img src="http://www.pconline.com.cn/pcedu/redian/code_2003/equipment/2/2x.gif" width="84" height="84" border="0"></a></td>
<td><a href="javascript:dressit(2,3)"><img src="http://www.pconline.com.cn/pcedu/redian/code_2003/equipment/2/3x.gif" width="84" height="84" border="0"></a></td>
<td><a href="javascript:dressit(2,4)"><img src="http://www.pconline.com.cn/pcedu/redian/code_2003/equipment/2/4x.gif" width="84" height="84" border="0"></a></td>
</tr>
<tr>
<td><a href="javascript:dressit(1,1)"><img src="http://www.pconline.com.cn/pcedu/redian/code_2003/equipment/1/1x.gif" width="84" height="84" border="0"></a></td>
<td><a href="javascript:dressit(1,2)"><img src="http://www.pconline.com.cn/pcedu/redian/code_2003/equipment/1/2x.gif" width="84" height="84" border="0"></a></td>
<td><a href="javascript:dressit(1,3)"><img src="http://www.pconline.com.cn/pcedu/redian/code_2003/equipment/1/3x.gif" width="84" height="84" border="0"></a></td>
<td><a href="javascript:dressit(1,4)"><img src="http://www.pconline.com.cn/pcedu/redian/code_2003/equipment/1/4x.gif" width="84" height="84" border="0"></a></td>
</tr>
</table>
打包下载: http://arch.pconline.com.cn/pcedu/redian/code_2003/example.rar
严重同意楼上...
好象也没用到JS呀