<!--
//PHP处理函数
function ubbReplace($str){
$str = str_replace("<",'<',$str);
$str = str_replace(">",'>',$str);
$str = str_replace("\n",'<br/>',$str);
$str = preg_replace("[\[/表情([0-9]*)\]]","<img src=\"face/$1.gif\" />",$str);
return $str;
}
//处理表情
$_POST['content'] = ubbReplace($_POST['content']);
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>QQ表情 jQuery 插件</title>
<link href="qqFace.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="jquery.qqFace.min.js"></script>
<style type="text/css">
.t{
font-size:12px;
color:#666666;
line-height:20px;
}
h1{
color:#000000;
border-bottom:1px #ccc solid;
}
.tools{
width:510px;
display:inline-block;
background:#ebeff8;
border:1px #d4d7e6 solid;
padding:5px;
}
.faceBtn{
color:#656565;
font-size:12px;
width:80px;
height:25px;
line-height:25px;
padding-left:25px;
background:url(face.gif) 4px 4px no-repeat;
cursor:pointer;
}
</style>
<script type="text/javascript">
//实例化表情插件
$(function(){
$('#face1').qqFace({
id : 'facebox1', //表情盒子的ID
assign:'content1', //给那个控件赋值
path:'face/' //表情存放的路径
});
$('#face2').qqFace({
id : 'facebox2',
assign:'content2',
path:'face/'
});
});
//查看结果
function view(id){
var str = $('#'+id).val();
str = str.replace(/\</g,'<');
str = str.replace(/\>/g,'>');
str = str.replace(/\n/g,'<br/>');
str = str.replace(/\[\/表情([0-9]*)\]/g,'<img src="face/$1.gif" border="0" />');
$('#result').html($('#result').html() + str);
}
</script>
</head>
<body>
<h1>QQ表情jQuery插件</h1>
<div class="t">
制作:黄海<br />
QQ:654706160<br />
邮箱:<a href="mailto:webs63@qq.com">webs63@qq.com</a><br />
网址:<a href="http://www.nommo.cc">http://www.nommo.cc</a><br />
微博:<a href="http://weibo.com/webs63">http://weibo.com/webs63</a><br />
欢迎jQuery爱好者与我联系,互相交流技术。
</div>
<div id="result"></div>
<div>
<br />
<br />
<div class="tools">
<div id="face1" class="faceBtn">添加表情</div>
<textarea id="content1" style="width:500px;height:100px;"></textarea><br />
</div>
<br />
<input type="button" value="提交" onclick="view('content1');" />
<br />
<br />
<div class="tools">
<div id="face2" class="faceBtn">添加表情</div>
<textarea id="content2" style="width:500px;height:100px;"></textarea>
</div>
<br />
<input type="button" value="提交" onclick="view('content2');" />
</div>
</body>
</html>
qq表情 点击图片出现qq表情,选中提交到文本框
5星 · 超过95%的资源 需积分: 12 140 浏览量
2012-07-19
13:40:09
上传
评论 1
收藏 234KB ZIP 举报
goldfishsky
- 粉丝: 261
- 资源: 30
最新资源
- 筷手引流工具.apk
- 论文(最终)_20240430235101.pdf
- 基于python编写的Keras深度学习框架开发,利用卷积神经网络CNN,快速识别图片并进行分类
- 最全空间计量实证方法(空间杜宾模型和检验以及结果解释文档).txt
- 5uonly.apk
- 蓝桥杯Python组的历年真题
- 2023-04-06-项目笔记 - 第一百十九阶段 - 4.4.2.117全局变量的作用域-117 -2024.04.30
- 2023-04-06-项目笔记 - 第一百十九阶段 - 4.4.2.117全局变量的作用域-117 -2024.04.30
- 前端开发技术实验报告:内含4四实验&实验报告
- Highlight Plus v20.0.1
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
- 1
- 2
- 3
前往页