Java version Post reply function
Because to do a post function, is the CKEditor plugin, and then reply, because of the function of ckeditor too much, I am not familiar with, but also a novice to the beginning of the way to find a simple point, see the online Borg reply is basically a content plus an expression on the OK, So I found a plug-in that looks like a reply.
With this plug-in to import a CSS and a JS on it, very convenient, this is for him to use the things are others on the site, that is, the resources on the line, if the network is broken or not can not use the Internet, which is also the price of convenience. If there is a great God can be localized after you want to notify me, I thanked.
Two plugins I will attach on, there is a need to download. The following is the page code, for reference only:
<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">
<meta http-equiv= "Content-type" content= "text/html; Charset=utf-8 ">
<link rel= "stylesheet" type= "Text/css" href= "/community/css/jquery.sinaemotion.css"/>
<style type= "Text/css" >
H1 {
Font:16px ' Microsoft Jas Black ';
Color: #0000ff;
}
body{
font-size:13px;
}
</style>
<title> Post Details </title>
<body onload= "Out ();" >
<div style= "Border-bottom:solid;" >
<p>${post.title}</p>
<p>${post.content}
<span style= "float:right;" ><fmt:formatdate value= "${post.posttime}" pattern= "Yyyy-mm-dd hh:mm:ss"/></span>
</p>
</div>
<div style= "Border:gray;" >
<c:choose>
<c:when test= "${empty replylist}" >
<p> No reply </p>
</c:when>
<c:otherwise>
<c:foreach items= "${replylist}" var= "Reply" varstatus= "Stu" >
<div style= "border-bottom:dotted;" >
<p style= "border-radius:5px;clear:both;background: #f1f1f1; color: #888;p adding:1px 4px;" >
${STU.INDEX+1} floor ${reply.username} <fmt:formatdate value= "${reply.replytime}" pattern= " Yyyy-mm-dd Hh:mm:ss "/> published
</p>
<p><span id= "Replycontentid" class= "Emotion" >${reply.content}</span></p>
</div>
</c:forEach>
</c:otherwise>
</c:choose>
<form action= "/community/bbs/addreply" method= "post" id= "Replyform" >
<input type= "hidden" name= "PostID" value= "${post.id}"/>
<textarea rows= "Ten" cols= "name=" content "class=" Emotion "style=" font-size:13px; " ></textarea>
<input id= "Face" type= "button" value= "expression"/>
<input type= "button" value= "Submit" onclick= "addreply ();" />
</form>
</div>
<br/>
<script type= "Text/javascript" src= "/community/js/jquery-1.8.0.min.js" ></script>
<script type= "Text/javascript" src= "/community/js/jquery.sinaemotion.js" ></script>
<script type= "Text/javascript" >
Binding Emoticons
$ (' #face '). Sinaemotion ($ ('. Emotion '));
function addreply () {
$ ("#replyForm"). Submit ();
}
$ (function () {
});
function out () {
var emotions=new Array ();
emotions=$ ('. Emotion ');
var temphtml= "";
for (var i=0;i<emotions.length;i++) {
temphtml=emotions[i].innerhtml;
if (Temphtml.indexof ("[") >-1| | Temphtml.indexof ("]") >-1) {
emotions[i].innerhtml=analyticemotion (temphtml );
}
}
}
</script>
</body>
The page shows the use of the C tag, backstage use is SPRINGMVC, backstage is a save reply information and query Post and reply information function, this will not write here, simple point is to delete and change the function.
Because often look at other people's blog to help themselves, so I also want to write blog to help others, write bad also please see people forgive me.
This article from the "Regular Verification Expression test" blog, declined reprint!
jquery Emoticons Plugin