PPJOKE 0.1 (网页嵌入聊天)提供下载

2019-09-14 07:30:35王旭

    }
}

//发送注销信息
function sendLogout (){
    var timestamps =  new Date().getTime()+Math.random();
    var sendAjax = new Ajax.Request(talkpath+'?act=logout×tamp='+timestamps,{method: 'get',parameters:'',onComplete:sendLogOutOk});
    function sendLogOutOk(req){
        if(req.responseText=="ok"){
            creatInfo(barinf_logoutok);
            $('ppjoke_logdiv').style.display='none';
            $('alogin').style.display='inline';
            $('ppjoke_alogout').style.display='none';
            $('name').value=Anonymous;
            $('name').blur();
            $('name').disabled = ''
            Field.select('talk');
            clearChat()    ;
        }else{
            creatInfo(barinf_logouterro);
        }
    }
}

function msg2face(msg,element){
    var msgtext=$A(msg.match(/([^[]*)([dd])?/gim));
    if(msgtext[0]){
        msgtext.each(function(word){
            var section = word.match(/([^[]*)[?(dd)?]?/i);
            if(section[1]){
            var msgtext = document.createTextNode(section[1]);
            element.appendChild(msgtext);
            }
            if(section[2]){
                msgimg = document.createElement('img');
                msgimg.setAttribute('src','ppjoke/images/smilies/Face_'+section[2]+'.gif');
                element.appendChild(msgimg);