日期:2014-05-16  浏览次数:20297 次

php一段代码不懂上来问下???
function showFace(showid, target, dropstr) {
if($(showid + '_menu') != null) {
$(showid+'_menu').style.display = '';
} else {
var faceDiv = document.createElement("div");
faceDiv.id = showid+'_menu';
faceDiv.className = 'p_pop facel';
faceDiv.style.position = 'absolute';
faceDiv.style.zIndex = 1001;
var faceul = document.createElement("ul");
for(i=1; i<32; i++) {
var faceli = document.createElement("li");
faceli.innerHTML = '<img src="' + STATICURL + 'image/smiley/comcom/'+i+'.gif" 

onclick="insertFace(\''+showid+'\','+i+', \''+ target +'\', \''+dropstr+'\')" style="cursor:pointer; 

position:relative;" />';
faceul.appendChild(faceli);
}
faceDiv.appendChild(faceul);
$('append_parent').appendChild(faceDiv)
}
setMenuPosition(showid, 0);
doane();
_attachEvent(document.body, 'click', function(){if($(showid+'_menu')) 

$(showid+'_menu').style.display = 'none';});
}
function insertFace(showid, id, target, dropstr) {
var faceText = '[em:'+id+':]';/*****控制点击后,表情解析的代码***************/

if($(target) != null) {
insertContent(target, faceText);
if(dropstr) {
$(target).value = $(target).value.replace(dropstr, "");
}
}
}
//以上js代码是控制图片点击显示,还有图片点击时所显示的代码样式.
//我想找到控制代码解析回去的代码,不知道是那一段。如果没有,请问解析回去的代码,大概是什么样的,帮忙说下我好找找,非常感谢

function wall_add(id) {
var obj = $('comment_ul');
var newdl = document.createElement("dl");
newdl.id = 'comment_'+id+'_li';
newdl.className = 'bbda cl';
var x = new Ajax();
x.get('home.php?mod=misc&ac=ajax&op=comment&inajax=1&cid='+id, function(s){
newdl.innerHTML = s;
});
obj.insertBefore(newdl, obj.firstChild);
if($('comment_message')) {
$('comment_message').value= '';
}
showCreditPrompt();
}

function share_add(sid) {
var obj = $('share_ul');
var newli = document.createElement("li");
newli.id = 'share_' + sid + '_li';
var x = new Ajax();
x.get('home.php?mod=misc&ac=ajax&op=share&inajax=1&sid='+sid, function(s){
newli.innerHTML = s;
});
obj.insertBefore(newli, obj.firstChild);
$('share_link').value = 'http://';
$('share_general').value = '';
showCreditPrompt();
}

function comment_add(id) {
var obj = $('comment_ul');
var newdl = document.createElement("dl");
newdl.id = 'comment_'+id+'_li';
newdl.className = 'bbda cl';
var x = new Ajax();
x.get('home.php?mod=misc&ac=ajax&op=comment&inajax=1&cid='+id, function(s){
newdl.innerHTML = s;
});
if($('comment_prepend')){
obj = obj.firstChild;
while (obj && obj.nodeType != 1){
obj = obj.nextSibling;
}
obj.parentNode.insertBefore(newdl, obj);
} else {
obj.appendChild(newdl);
}
if($('comment_message')) {
$('comment_message').value= '';
}
if($('comment_replynum')) {
var a = parseInt($('comment_replynum').innerHTML);
var b = a + 1;
$('comment_replynum').innerHTML = b + '';
}
showCreditPrompt();
}
function comment_edit(cid) {
var obj = $('comment_'+ cid +'_li');
var x = new Ajax();
x.get('home.php?mod=misc&ac=ajax&op=comment&inajax=1&cid='+ cid, function(s){
obj.innerHTML = s;
var elems = selector('dd[class~=magicflicker]');
for(var i=0; i<elems.length; i++){
magicColor(elems[i]);
}
});
}
function comment_delete(cid) {
var obj = $('comment_'+ cid +'_li');
obj.style.display = "none";