注册 登录  
 加关注
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

火力光波的博客

火一般的热情 光一样的速度

 
 
 

日志

 
 

添加留言表情的演示代码  

2010-01-23 17:17:35|  分类: 网络媒体 |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |

添加留言表情的演示代码

 

<SCRIPT language=javascript type=text/javascript>
function aa(src)
{
     var imgsrc="[img]"+src+"[/img]";
      document.forms[0].gb_word.value+=imgsrc;
// document.forms[0].newcode.focus();
   document.getElementById('newcode').focus();
toimg();
}
function dd()
{
   var df=document.getElementById('newcode').innerHTML;
   document.getElementById('kk').innerHTML=df;
   document.getElementById('fff').value=df;
}
</SCRIPT>

<STYLE>p{margin-top:3;margin-bottom:3}</STYLE>
<FORM action="" method=get>
<div class=titleline_green>&nbsp;</div>
<div class=titleline_green>&nbsp;添加留言表情:</div>
<div class=team_r style="WIDTH:700px; HEIGHT: 60px">&nbsp;
<IMG style="CURSOR: hand" onclick=aa(this.src); height=20

src="http://webdesign.chinaitlab.com/UploadFiles_8014/200708/20070823121216187.gif " width=20>&nbsp;
<IMG style="CURSOR: hand" onclick=aa(this.src); height=20

src="http://webdesign.chinaitlab.com/UploadFiles_8014/200708/20070823121217659.gif " width=20>&nbsp;
<IMG style="CURSOR: hand" onclick=aa(this.src); height=20

src="http://webdesign.chinaitlab.com/UploadFiles_8014/200708/20070823121224775.gif " width=20>
<IMG style="CURSOR: hand" onclick=aa(this.src); height=48 src="
http://f.imagehost.org/0031/xt035.gif

" width=72>
<IMG style="CURSOR: hand" onclick=aa(this.src); height=50 src="
http://f.imagehost.org/0904/xt008.gif

" width=50>
<IMG style="CURSOR: hand" onclick=aa(this.src); height=50 src="
http://f.imagehost.org/0932/xt026.gif" width=70>
<IMG style="CURSOR: hand" onclick=aa(this.src); height=50

src="http://img.blog.163.com/photo/BD2pRUVcg1jARkp45kILSQ==/4548072673691157966.jpg" width=50>
<IMG style="CURSOR: hand" onclick=aa(this.src); height=50

src="http://img.blog.163.com/photo/EywHOVtpaE4ZQzJK3w8ihw==/3989063369943851444.jpg" width=50>
<IMG style="CURSOR: hand" onclick=aa(this.src); height=50

src="http://img.blog.163.com/photo/kXNKXf4xyLpIqBKYO0Pplw==/2887088836121642899.jpg" width=50>
<IMG style="CURSOR: hand" onclick=aa(this.src); height=50 src="
http://www.ratebbs.com/images/smilies/yct/8.GIF" width=50>
<IMG style="CURSOR: hand" onclick=aa(this.src); height=50 src="
http://www.ratebbs.com/images/smilies/yct/23.GIF" width=50>
<IMG style="CURSOR: hand" onclick=aa(this.src); height=50 src="
http://www.ratebbs.com/images/smilies/yct/9.gif" width=50></div>

<div style="DISPLAY: none">
<TEXTAREA id=code onkeydown=gbcount(this.form.gb_word,this.form.total,this.form.used,this.form.remain); onkeyup=gbcount
(this.form.gb_word,this.form.total,this.form.used,this.form.remain); name=gb_word rows=10 cols=48 mce_editable="true"></TEXTAREA></div>

<div contentEditable id ="newcode" style=" float:left; border-top:double; overflow:auto; border-bottom:double; border-left:double; border-left-width:thin; border-right:double; border-width:5px; width:150px; height:130px;"></div>

<div contentEditable id ="kk" style=" float:left; border-top:double; border-bottom:double; border-left:double; border-left-width:thin; border-right:double; border-width:5px; width:150px; height:130px;"></div>

<TEXTAREA id=fff style="WIDTH: 400px; HEIGHT: 100px" name=kkksdsad rows=6 cols=44 mce_editable="true"></TEXTAREA>
<BR><button onclick=dd();>提交</button><button onclick="window.location.reload()">清除</button><BR>;

<SCRIPT language=javascript>
var code = document.getElementById("code");
var newcode = document.getElementById("newcode");
function toimg(){
var df=document.getElementById('newcode').innerHTML; var ff=code.innerHTML.replace(/\[(img)\](.+?)\[\/\1\]/g,"<img src=\"$2\" >");
newcode.innerHTML = df+ff;
document.forms[0].gb_word.value="";
}
</SCRIPT>

 1、下图是代码的截图效果(如要看到真正的显示效果,请将上面的代码复制粘贴到“运行代码框”上测试,即可!)添加留言表情的演示代码 - 火力光波 - 火力光波的博客

 2、代码中蓝色部分,是表情图片的地址和图片的高度、宽度,可更换、调整。

 

 最基本的表情图地址

http://webdesign.chinaitlab.com/UploadFiles_8014/200708/20070823121216187.gif
http://webdesign.chinaitlab.com/UploadFiles_8014/200708/20070823121217462.gif
http://webdesign.chinaitlab.com/UploadFiles_8014/200708/20070823121217659.gif
http://webdesign.chinaitlab.com/UploadFiles_8014/200708/20070823121219916.gif
http://webdesign.chinaitlab.com/UploadFiles_8014/200708/20070823121224699.gif
http://webdesign.chinaitlab.com/UploadFiles_8014/200708/20070823121224930.gif
http://webdesign.chinaitlab.com/UploadFiles_8014/200708/20070823121224775.gif
http://webdesign.chinaitlab.com/UploadFiles_8014/200708/20070823121224780.gif
http://webdesign.chinaitlab.com/UploadFiles_8014/200708/20070823121226789.gif
http://webdesign.chinaitlab.com/UploadFiles_8014/200708/20070823121227233.gif
http://webdesign.chinaitlab.com/UploadFiles_8014/200708/20070823121227687.gif
http://webdesign.chinaitlab.com/UploadFiles_8014/200708/20070823121227280.gif
http://webdesign.chinaitlab.com/UploadFiles_8014/200708/20070823121227465.gif
http://webdesign.chinaitlab.com/UploadFiles_8014/200708/20070823121228189.gif
http://webdesign.chinaitlab.com/UploadFiles_8014/200708/20070823121229198.gif
http://webdesign.chinaitlab.com/UploadFiles_8014/200708/20070823121229387.gif
http://webdesign.chinaitlab.com/UploadFiles_8014/200708/20070823121230355.gif
http://webdesign.chinaitlab.com/UploadFiles_8014/200708/20070823121231448.gif
http://webdesign.chinaitlab.com/UploadFiles_8014/200708/20070823121231145.gif
http://webdesign.chinaitlab.com/UploadFiles_8014/200708/20070823121231836.gif
http://webdesign.chinaitlab.com/UploadFiles_8014/200708/20070823121231101.gif
http://webdesign.chinaitlab.com/UploadFiles_8014/200708/20070823121231510.gif
http://webdesign.chinaitlab.com/UploadFiles_8014/200708/20070823121232147.gif
http://webdesign.chinaitlab.com/UploadFiles_8014/200708/20070823121232319.gif
http://webdesign.chinaitlab.com/UploadFiles_8014/200708/20070823121232577.gif
http://webdesign.chinaitlab.com/UploadFiles_8014/200708/20070823121232242.gif
http://webdesign.chinaitlab.com/UploadFiles_8014/200708/20070823121232580.gif
http://webdesign.chinaitlab.com/UploadFiles_8014/200708/20070823121233753.gif
http://webdesign.chinaitlab.com/UploadFiles_8014/200708/20070823121233893.gif
http://webdesign.chinaitlab.com/UploadFiles_8014/200708/20070823121233656.gif
http://webdesign.chinaitlab.com/UploadFiles_8014/200708/20070823121234548.gif
http://webdesign.chinaitlab.com/UploadFiles_8014/200708/20070823121234355.gif
http://webdesign.chinaitlab.com/UploadFiles_8014/200708/20070823121234180.gif
http://webdesign.chinaitlab.com/UploadFiles_8014/200708/20070823121234378.gif
http://webdesign.chinaitlab.com/UploadFiles_8014/200708/20070823121234525.gif
http://webdesign.chinaitlab.com/UploadFiles_8014/200708/20070823121235905.gif
http://webdesign.chinaitlab.com/UploadFiles_8014/200708/20070823121235841.gif
http://webdesign.chinaitlab.com/UploadFiles_8014/200708/20070823121236120.gif
http://webdesign.chinaitlab.com/UploadFiles_8014/200708/20070823121236251.gif
http://webdesign.chinaitlab.com/UploadFiles_8014/200708/20070823121237555.gif
http://webdesign.chinaitlab.com/UploadFiles_8014/200708/20070823121237931.gif
http://webdesign.chinaitlab.com/UploadFiles_8014/200708/20070823121237975.gif
 http://webdesign.chinaitlab.com/UploadFiles_8014/200708/20070823121238834.gif"
http://webdesign.chinaitlab.com/UploadFiles_8014/200708/20070823121238542.gif
http://webdesign.chinaitlab.com/UploadFiles_8014/200708/20070823121239454.gif 

 

 


相关连接:  兔斯基、悠嘻猴、洋葱头表情     将表情动画的背景变透明 

                  添加留言表情      117套超可爱QQ表情MSN大头贴下载

 

   添加留言表情的演示代码 - 火力光波 - 火力光波的博客 

  评论这张
 
阅读(1432)| 评论(9)
推荐 转载

历史上的今天

在LOFTER的更多文章

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2017