留言板表情

2016-02-10 09:30:05 -0500
$.ready(function(){
var h=$("body"),b=h.html(),str="";
var p=/\[([0-9]+)\]/ig;
if(p.test(b)){
h.html(b.replace(p,'<img src="/browse/dl/384422/emoji/$1.png" />'));
}
for(var i=0;i<40;i++){
str+='<tr><td><b>['+(i+1)+']:</b></td><td><img src="/browse/dl/384422/emoji/'+(i+1)+'.png" onclick="setFace('+(i+1)+');"></td></tr>';
}
$(".faceMain").html(str);
});
function setFace(i){
var a=$(".wo-reply-textarea");
if(a.val()==""){
a.val("["+i+"] ");
}else{
a.val(a.val()+"["+i+"] ");
}
}
查看示例》》
«Newer      Older»

----Comments(1)----
@cccjjjlll | @ at 2016-02-10 12:25:
[1]

Back to home

Subscribe | Register | Login | N