修复登录页问题,添加论坛表情

This commit is contained in:
FJY
2017-11-30 17:24:00 +08:00
parent 5e87ddf1ba
commit 40483bae6a
22 changed files with 788 additions and 198 deletions

View File

@@ -20,6 +20,7 @@
rel="stylesheet">
<link href="forum/css/animate.css" rel="stylesheet">
<link href="forum/css/style.css" rel="stylesheet">
<link href="css/emoji.css" rel="stylesheet">
</head>
@@ -60,10 +61,11 @@
<!--<input type="text" class="form-control" name="subject"></div>-->
<div class="form-group">
<label for="textContent">内容</label>
<label for="textContent">内容</label>标签
<textarea rows="10" cols="135" name="content"
class="form-control" placeholder="内容"></textarea>
<input class="btn btn-default pull-right createNew" type="submit"
class="form-control" placeholder="内容" id="form-control"></textarea>
<p class="emotion" style="margin-left: 30px;">标签</p>
<input class="btn btn-default pull-right createNew" type="submit"
value="发表帖子">
</div>
</div>
@@ -116,6 +118,46 @@
$('.click2edit').destroy();
};
</script>
<script src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/jquery.qqFace_forum.js"></script>
<script type="text/javascript">
$(function() {
$('.emotion').qqFace({
id : 'facebox',
assign : 'form-control',
path : 'chartroom/arclist/' //表情存放的路径
});
$(".send").click(function() {
var str = $("#form-control").val();
$("#show").html(replace_em(str));
});
});
//查看结果
function replace_em(str) {
str = str.replace(/\</g, '&lt;');
str = str.replace(/\>/g, '&gt;');
str = str.replace(/\n/g, '<br/>');
str = str.replace(/\[em_([0-9]*)\]/g, '< img src="chartroom/arclist/$1.gif" border="0" />');
return str;
}
</script>
</body>
</html>