jquery Emoticons Plugin

Source: Internet
Author: User

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 &nbsp;${reply.username}&nbsp;<fmt:formatdate value= "${reply.replytime}" pattern= " Yyyy-mm-dd Hh:mm:ss "/>&nbsp; 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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.