typeof-帮忙看看为何管理那块不显示呢 是在JS文件里的

问题描述

帮忙看看为何管理那块不显示呢 是在JS文件里的
var ghost = window.location.hostname+"":2258"";
var sendrefresh = true;
var showicon = true;
var portraiturl = ""http://"" + host + ""/IceBeans/"";
var usenickname = 0;
var listmode = 1;
function UserList() {
this.nSort = 0;
this.nSort0 = 0;
this.m_pUsers = new Array();
this.GetCount = function () { return this.m_pUsers.length; }
this.GetAdminCount = function () {
var num = 0;
for (var i = 0; i < this.GetCount(); i++) {
if (this.GetObject(i).usertype == ""11"") {
num++;
}
}
return num;
}
this.GetUserCount = function () {
return this.m_pUsers.length;// - this.GetAdminCount();
}
this.GetObject = function (n) { return this.m_pUsers[n]; }
this.GetID = function (strName) {
var obj;
for (var i = 0; i < this.GetCount(); i++) {
if (this.GetObject(i).name == strName) {
obj = this.GetObject(i);
return obj.id;
}
}
return 0;
}
this.Find = function (strName) {
for (var i = 0; i < this.GetCount(); i++)
if (this.GetObject(i).name == strName) return i;
return -1;
}
this.FindObject = function (strName) {
var i = this.Find(strName);
if (i != -1)
return this.GetObject(i);
return null;
}
this.FindbyID = function (ID) {
for (var i = 0; i < this.GetCount(); i++)
if (this.GetObject(i).id == ID) return i;
return -1;
}
this.FindObjectbyID = function (ID) {
var i = this.FindbyID(ID);
if (i != -1)
return this.GetObject(i);
return null;
}
this.Add = function (name adminmode usertype extinfo icon id sex voice video) {
var obj n;
if ((n = this.Find(name)) != -1) obj = this.GetObject(n);
else obj = new UserObject();
obj.name = name;
obj.adminmode = adminmode;
obj.usertype = usertype;
obj.extinfo = extinfo;
obj.icon = icon;
obj.id = id;
obj.sex = sex;
obj.voice = voice;
obj.video = video;
obj.level = get_user_type(name);
if (n == -1) this.m_pUsers[this.GetCount()] = obj;
this.DoSort();
}
this.Del = function (strName) {
var n = this.Find(strName);
if (n != -1) {
delete this.m_pUsers[n];
this.m_pUsers.sort(this.SortOnNull);
this.m_pUsers.length--;
return true;
} return false;
}
this.RemoveAll = function () {
for (var i = 0; i < this.GetCount(); i++)
delete this.m_pUsers[i];
this.m_pUsers.length = 0;
}

this.SortOnXB = function (a b) {    var n1 = a.sex;    var n2 = b.sex;    if (n1 == n2) return 0;    if (n1 > n2) return 1;    if (n1 < n2) return -1;}this.SortOnName = function (a b) {    var n1 = a.name.length;    var n2 = b.name.length;    if (n1 == n2) return 0;    if (n1 > n2) return -1;    if (n1 < n2) return 1;}this.SortOnName1 = function (a b) {    var a2 = new String(a.name);    var b2 = new String(b.name);    if (a.adminmode == 1 && b.adminmode != 1) {        t = -1;    } else if (a.adminmode != 1 && b.adminmode == 1) {        t = 1;    } else {        if (a2.substr(0 1) == ""*"" && b2.substr(0 1) != ""*"") {            t = -1;        } else if (a2.substr(0 1) != ""*"" && b2.substr(0 1) == ""*"") {            t = 1;        } else {            if (a2 == b2) {                t = 0;            }            if (a2 > b2) {                t = -1;            }            if (a2 < b2) {                t = 1;            }        }    }    return t;}this.SortOnName2 = function (a b) {    if (a.adminmode == 1 && b.adminmode != 1) {        t = -1;    } else if (a.adminmode != 1 && b.adminmode == 1) {        t = 1;    } else {        t = 0;    }    return t;}this.SortOnUserType = function (a b) {    if (a.adminmode == 1 && b.adminmode != 1) {        t = -1;    } else if (a.adminmode != 1 && b.adminmode == 1) {        t = 1;    } else {        if (a.usertype > b.usertype) {            t = 1;        } else if (a.usertype < b.usertype) {            t = -1;        } else {            if (a.name < b.name) {                t = 1;            } else if (a.name > b.name) {                t = -1;            } else {                t = 0;            }        }    }    return t;}this.SortOnNull = function (a b) {    if (a == null || b == null) return -1;    return 0;}this.DoSort = function () {    return;}this.SortByLevel = function () {    this.m_pUsers.sort(function (a b) { return a.level - b.level; });}

}

var timerID = null timerRunning = false;
function refreshstop() { if (timerRunning) clearTimeout(timerID); timerRunning = false; }
function refreshstart() { refreshstop(); writeuserlist(); }
function Users_Add(name adminmode usertype extinfo icon id sex voice video exps nickname) {
var isnewuser = (parent.Users.FindObject(name) == null);
try {
this.d.refreshsdx(name id);
} catch (e) { }
if (limituserlist == 1) {
if ((voice == 0) && (video == 0)) {
newlogin(name id nickname);
}
if (usertype != ""11"") { //如果是管理员保证列出。可以在脚本中重定义本函数使得VIP用户也可以保证列出
if (this.Users.GetCount() > limituserlistnum) {
return;
}
}
}
this.Users.Add(name adminmode usertype extinfo icon id sex voice video exps nickname);
if (this.Users.GetCount() < refreshatonce_threshold) {
refreshstart();
}
if (listmode == 1) {
if (list_parsed == 0) {
var tmp = name + ""-'"" + adminmode + ""-'"" + usertype + ""-'"" + extinfo + ""-'"" + icon + ""-'"" + id + ""-'"" + exps + ""-'"" + nickname + ""'-"" + sex + ""'-"" + voice + ""'-"" + video;
list.push(tmp);
list_length = list.length;
} else {
addusertolist(name adminmode usertype extinfo icon id sex voice video exps nickname);
}
}

if (isAutoWelcome && isnewuser) {    if (get_user_type(name) > 10) {        setTimeout('parent.d.send_msg_ex(""' + name + '""[Advertising][username=' + parent.myinfo.USER + ']"""111"1)' 15000);    }}

}
function Users_Add1(name adminmode usertype extinfo icon id sex voice video exps nickname) {
if (limituserlist == 1) {
if ((voice == 0) && (video == 0)) {
newlogin(name id nickname);
}
if (usertype != ""11"") { //如果是管理员保证列出。可以在脚本中重定义本函数使得VIP用户也可以保证列出
if (this.Users.GetCount() > limituserlistnum) {
return;
}
}
}
this.Users.Add(name adminmode usertype extinfo icon id sex voice video exps nickname);
this.Users.SortByLevel();
if (this.Users.GetCount() < refreshatonce_threshold) {
//refreshstart();
}
/*增加到用户列表*/
if (listmode == 1) {
addusertolist(name adminmode usertype extinfo icon id sex voice video exps nickname);
}
}
function newlogin(name id nickname) {
if (this.n == null) return;
if (this.n.document == null) return;
var objTable = this.n.document.getElementById('newuserlisttable');
var row = objTable.rows.length;
var i = 0;
for (i = 1; i < row; i++) {
if (objTable.rows[i].id == id) {
return;
}
}
if (objTable.rows.length >= 6) {
objTable.deleteRow(1);
}
var objRow = objTable.insertRow();
objRow.id = id;
var objCell = objRow.insertCell();
if (usenickname) {
objCell.innerHTML = ""["" + nickname + ""]"";
} else {
objCell.innerHTML = ""["" + name + ""]"";
}
}

function Users_Del(str) {
if (this.Users.Del(str))
if (this.Users.GetCount() < refreshatonce_threshold) {
refreshstart();
}
if (listmode == 1) {
deluserfromlist(str);
}
}
function Users_GetID(str) {
return this.Users.GetID(str);
}

var Users = new UserList();

function dodeluserfromlist(listtable name) {
var i;
var rown = 0;
rown = listtable.rows.length;
for (i = 0; i < rown; i++) {
if (listtable.rows[i].id == name) {
listtable.deleteRow(i);
return 1;
break;
}
}
return 0;
}
function smdeluser(listtablename)
{
var table = this.r.document.getElementById(""""+listtable+"""");
dodeluserfromlist(table name);
this.r.document.getElementById(""AdminCount"").innerHTML = this.r.document.getElementById(""AdminCount"").innerHTML-1;
}
function checkvipuser(name) {
return ""Z"";
}
function getlist(type) {
if (type != ""adm"") return;
alist = new Array();
listtable = this.r.document.getElementById(""listtable_"" + type);
rown = listtable.rows.length;
for (i = 0; i < rown; i++) {
alist[alist.length] = listtable.rows[i].id;
}

}
function Swap(table i j) {
if (i < 0 || j > table.rows.length - 1) return;
if (i < j) {
table.moveRow(i j);
table.moveRow(j - 1 i);
}
else {
table.moveRow(i j);
table.moveRow(j + 1 i);
}
}
function addusertolist(name adminmode usertype extinfo icon id sex voice video exps nickname) {
if (this.r == null) return;
if (this.r.document == null) return;
if (list_parsed == 1) {
//this.r.document.getElementById(""usercount"").innerHTML = Users.GetCount();
this.r.document.getElementById(""AdminCount"").innerHTML = Users.GetAdminCount();
this.r.document.getElementById(""UserCount"").innerHTML = Users.GetUserCount();
}
if (ppmode == 1) { voice = 1; }
var i;
var listtable listrow listcell;
var rown = 0;
if (adminmode == 0) { //remove from listtable_adm
/*下管情况需删除管理员里相同名字*/
listtable = this.r.document.getElementById(""listtable_adm"");
dodeluserfromlist(listtable name);
}
/*取相关列表表格*/
level = get_user_type(name);
portrait = """";
//icon = """";
displayname = new String(name);
if (extinfo != 0) t = extinfo;
else t = """";
var infolist = new Array("""");
if (typeof (t) != ""undefined"" && t != """" && displayname.substr(0 1) == ""*"") {
infolist = t.split("":"");
if (!infolist[0]) { infolist[0] = """" };
if (!infolist[1]) { infolist[1] = """" };
if (!infolist[2]) { infolist[2] = """" };
portrait = infolist[0];
//icon = infolist[1];
}

userinfo0 = getptid(name portrait adminmode)userinfo = userinfo0.split(""t"");styletext = """"title = """";adminmode_ret = adminmode;if (userinfo.length >= 1) {    ptid = userinfo[0];    if (userinfo.length >= 2) {        styletext = userinfo[1];        if (userinfo.length >= 3) {            title = userinfo[2];            if (userinfo.length >= 4) {                adminmode_ret = userinfo[3];            }        }    }} else {    ptid = userinfo0;}if (usertype == ""11"") {    listtable = this.r.document.getElementById(""listtable_sm"");} else if (level > 0 ) {    listtable = this.r.document.getElementById(""listtable_vip"");} else if (name.charAt(0) == '*' ) {    listtable = this.r.document.getElementById(""listtable_reg"");} else {    listtable = this.r.document.getElementById(""listtable_other"");}rown = listtable.rows.length;listrow = null;/*按级别和昵称字符排序*/for (i = 0; i < rown; i++) {    cmpname = listtable.rows[i].id;    cmplevel = listtable.rows[i].level;    cmpstr = cmplevel + cmpname;    if (cmpstr == level + name) {        listrow = listtable.rows[i];    }}//    var p_length = listtable.rows.length;//    for (var i = 0; i <= p_length - 2; i++) {//        for (var j = p_length - 1; j >= 1; j--) {//            if (listtable.rows[j].level < listtable.rows[j - 1].level) {//                Swap(listtable j j - 1);//            }//        }//    }if (listrow == null) {    /*没有此名的*/    /*上管情况下需从其他列表表格中删除同名者,*/    if (adminmode > 0) {        var listtable1;        listtable1 = this.r.document.getElementById(""listtable_vip"");        if (dodeluserfromlist(listtable1 name) == 0) {            listtable1 = this.r.document.getElementById(""listtable_reg"");            if (dodeluserfromlist(listtable1 name) == 0) {                listtable1 = this.r.document.getElementById(""listtable_other"");                dodeluserfromlist(listtable1 name);            }        }    }    /*增加进相关列表表格*/    listrow = listtable.insertRow(i);    listrow.id = name;    listrow.level = level;} else {    /*有此名的,先删除该行第一列(声频视频状态可能变化,需要重写)*/    listrow.deleteCell(0);}/*重写该行第一列*/listcell = listrow.insertCell(0);var cellcontent = """";if (showicon == true) {    //portrait = ""<image src="" + ptid + "".gif border=0 align=absmiddle>"";    var s = sex == 0 ? ""0"" : ""1"";    s = ""1"";    var imgurl = myvip.GetImgUrl(name s);    portrait = ""<image src='"" + imgurl + ""' border='0' align='absmiddle'>"";   //portrait += ""<img src='"" + ""http://m.ABC.COM/xq/"" + icon + ""_x.gif"" + ""' border='0'  align='absmiddle'>"";} else {    portrait = """";}if (voice == 1) {  voicenote = ""<font face=""Webdings"" color=000000>&#175</font>"";    nametitle = name + "" 开麦"";} else if (voice == 2) {    voicenote = ""<font face=""Wingdings"" color=black>(</font>"";    nametitle = name + "" 双工"";} else {    voicenote = """";    nametitle = name + "" 关麦"";}if (adminmode_ret == 1) {    nametitle += "" 在线管理员"";}if (title != """") {    nametitle += "" "" + title;}if (nametitle != """") nametitle = "" title="""" + nametitle + """""";if (adminmode_ret == 1) {    if (styletext == """") {        styletext = ""color:red;"";        displayname += ""<font color=red></font>"";    } else {        displayname += ""*"";    }}if (styletext == ""0"") styletext = """";var ucolor = usercolor.FindObject(name);var xc = is_uservip(name);if (xc != null) {    var v = xc.split("");    //displayname += ""<img src=http://www.ABC.COM/user/xc2/"" + v[5] + "" border=0 hspace=1 vspace=1 align='absmiddle' /> "";    //displayname = ""<a target=d href=""javascript:parent.cs('"" + name + ""')""title="""" + v[6] + """">"";    if (v[0] == '1') {        displayname = ""<img src=http://www.ABC.COM/user/xc1/"" + v[1] + "" border=0><font style=""filter: glow(color=#9933FFstrength=4); Height:8pt; color:#FFFFFF; padding:1px;cursor:hand"">"" + v[7] + ""</font>""    } else {        displayname = ""<font style=""filter: glow(color=#"" + v[2] + ""strength=4); Height:8pt; color:#"" + v[3] + ""; padding:1px;cursor:hand"">"" + v[4] + ""</font><font style=""filter: glow(color=#9933FFstrength=4); Height:8pt; color:#FFFFFF; padding:1px;cursor:hand"">"" + v[7] + ""</font>"";    }} else if (ucolor != null) {    if (styletext) {        displayname = ""<span style='filter: glow(color="" + ucolor.outcolor + ""strength=4); PADDING-BOTTOM: 1px; padding-left: 1px; padding-right: 1px; height: 8pt; color: red; cursor: hand; padding-top: 1px;'>"" + displayname + ""</span>"";    }    else {        displayname = ""<span style='filter: glow(color="" + ucolor.outcolor + ""strength=4); PADDING-BOTTOM: 1px; padding-left: 1px; padding-right: 1px; height: 8pt; color: "" + ucolor.incolor + ""; cursor: hand; padding-top: 1px;'>"" + displayname + ""</span>"";    }} else if (styletext) {    displayname = ""<span style='"" + styletext + ""'>"" + displayname + ""</span>"";}cellcontent += portrait + ""&nbsp;<a class='name' target=d href=""javascript:parent.cs('"" + name + ""')"" "" + nametitle + "">"" + displayname + ""</a>"";cellcontent += voicenote;if (video == 1) {

cellcontent += """";
}
var twgif="""";
if ((level >= 13 && level <= 15) && video == 1) {
cellcontent += """";
cellcontent += """";
twgif = """";
}

listcell.innerHTML = ""<span class='ydt'></span>"" + twgif + cellcontent;

}
function deluserfromlist(name) {
if (this.r == null) return;
if (this.r.document == null) return;
if (list_parsed == 1) {
//this.r.document.getElementById(""usercount"").innerHTML = Users.GetCount();
this.r.document.getElementById(""AdminCount"").innerHTML = Users.GetAdminCount();
this.r.document.getElementById(""UserCount"").innerHTML = Users.GetUserCount();
}

var listtable;listtable = this.r.document.getElementById(""listtable_adm"");if (dodeluserfromlist(listtable name) > 0) return;listtable = this.r.document.getElementById(""listtable_vip"");if (dodeluserfromlist(listtable name) > 0) return;listtable = this.r.document.getElementById(""listtable_reg"");if (dodeluserfromlist(listtable name) > 0) return;listtable = this.r.document.getElementById(""listtable_other"");if (dodeluserfromlist(listtable name) > 0) return;return;

}
function removealluserfromlist() {
if (this.r == null) return;
if (this.r.document == null) return;
if (list_parsed == 1) {
//this.r.document.getElementById(""usercount"").innerHTML = Users.GetCount();
this.r.document.getElementById(""AdminCount"").innerHTML = Users.GetAdminCount();
this.r.document.getElementById(""UserCount"").innerHTML = Users.GetUserCount();
}
var i;
var listtable;
var rown = 0;
listtable = this.r.document.getElementById(""listtable_adm"");
rown = listtable.rows.length;
for (i = rown - 1; i >= 0; i--) {
listtable.deleteRow(i);
}
listtable = this.r.document.getElementById(""listtable_vip"");
rown = listtable.rows.length;
for (i = rown - 1; i >= 0; i--) {
listtable.deleteRow(i);
}
listtable = this.r.document.getElementById(""listtable_reg"");
rown = listtable.rows.length;
for (i = rown - 1; i >= 0; i--) {
listtable.deleteRow(i);
}
listtable = this.r.document.getElementById(""listtable_other"");
rown = listtable.rows.length;
for (i = rown - 1; i >= 0; i--) {
listtable.deleteRow(i);
}
}

/* 由setInterval循环调用本函数初始用户数组list(按先后顺序)赋值至Users利用list_parsing标识避免冲突 */
function dolistparse() {
if (list_parsing) {
return;
}
list_parsing = 1;
list_i++;
var i = list_i;
if (i < list_length) {
if (list[i] != null) {
sublists = list[i].split(""'-"");
if (sublists.length == 4) {
if (!sublists[1]) sublists[1] = '';
if (!sublists[2]) sublists[2] = '';
if (!sublists[3]) sublists[3] = '';
sex = sublists[1];
voice = sublists[2];
if (ppmode == 1) { voice = 1; }
video = sublists[3];
} else {
if (!sublists[1]) sublists[1] = '';
if (!sublists[2]) sublists[2] = '';
voice = sublists[1];
if (ppmode == 1) { voice = 1; }
video = sublists[2];
sex = 0;
}
lists = sublists[0].split(""-'"");

        if (!lists[1]) lists[1] = '';        if (!lists[2]) lists[2] = '';        if (!lists[3]) lists[3] = '';        if (!lists[4]) lists[4] = '';        if (!lists[5]) lists[5] = '';        if (!lists[6]) lists[6] = '0';        if (!lists[7]) lists[7] = '';        name = lists[0];        adminmode = lists[1];        usertype = lists[2];        extinfo = lists[3];        icon = lists[4];        id = lists[5];        exps = lists[6];        nickname = lists[7];        Users_Add1(name adminmode usertype extinfo icon id sex voice video exps nickname);    }} else {    clearInterval(list_timer);    list_parsed = 1;    //this.r.document.getElementById(""usercount"").innerHTML = Users.GetCount();    this.r.document.getElementById(""AdminCount"").innerHTML = Users.GetAdminCount();    this.r.document.getElementById(""UserCount"").innerHTML = Users.GetUserCount();}list_parsing = 0;

}

function RefreshUsers() {
if (listmode == 1) {
list_parsed = 0;
list_i = 0;
list_length = 0;
list_parsing = 0;
list_length = list.length;
Users.RemoveAll();
removealluserfromlist();
list_timer = setInterval(""dolistparse()"" 1);
if ((this.r != null) && (this.r.document != null)) {
//this.r.document.getElementById(""usercount"").innerHTML = this.usercount;
this.r.document.getElementById(""AdminCount"").innerHTML = Users.GetAdminCount();
this.r.document.getElementById(""UserCount"").innerHTML = Users.GetUserCount();
}
return;
}
Users.RemoveAll();
for (var i = 1; i < list.length; i++)
if (list[i] != null) {
sublists = list[i].split(""'-"");
if (sublists.length == 4) {
if (!sublists[1]) sublists[1] = '';
if (!sublists[2]) sublists[2] = '';
if (!sublists[3]) sublists[3] = '';
sex = sublists[1];
voice = sublists[2];
video = sublists[3];
} else {
if (!sublists[1]) sublists[1] = '';
if (!sublists[2]) sublists[2] = '';
voice = sublists[1];
video = sublists[2];
sex = 0;
}
lists = sublists[0].split(""-'"");

        if (!lists[1]) lists[1] = '';        if (!lists[2]) lists[2] = '';        if (!lists[3]) lists[3] = '';        if (!lists[4]) lists[4] = '';        if (!lists[5]) lists[5] = '';        name = lists[0];        adminmode = lists[1];        usertype = lists[2];        extinfo = lists[3];        icon = lists[4];        id = lists[5];        Users_Add(name adminmode usertype extinfo icon id sex voice video);    }refreshclick = true;writeuserlist();

}

function writerframe() {
if (listmode == 0) {
return;
}
if (this.r == null) return;
if (this.r.document == null) return;
this.r.document.open();
this.r.document.writeln(""

"");
this.r.document.writeln("""");
this.r.document.writeln("""");
this.r.document.writeln("" &quot;);<br> this.r.document.writeln(&quot; function openShutManager(oSourceObj oTargetObj shutAble oOpenTip oShutTip) {&quot;);<br> this.r.document.writeln(&quot; var sourceObj = typeof oSourceObj == &quot;string&quot; ? document.getElementById(oSourceObj) : oSourceObj;&quot;);<br> this.r.document.writeln(&quot; var targetObj = typeof oTargetObj == &quot;string&quot; ? document.getElementById(oTargetObj) : oTargetObj;&quot;);<br> this.r.document.writeln(&quot; var openTip = oOpenTip || &quot;&quot;;&quot;);<br> this.r.document.writeln(&quot; var shutTip = oShutTip || &quot;&quot;;&quot;);<br> this.r.document.writeln(&quot; if (targetObj.style.display != &quot;none&quot;) {&quot;);<br> this.r.document.writeln(&quot; if (shutAble) return;&quot;);<br> this.r.document.writeln(&quot; targetObj.style.display = &quot;none&quot;;&quot;);<br> this.r.document.writeln(&quot; if (openTip &amp;&amp; shutTip) {&quot;);<br> this.r.document.writeln(&quot; sourceObj.innerHTML = shutTip;&quot;);<br> this.r.document.writeln(&quot; }&quot;);<br> this.r.document.writeln(&quot; } else {&quot;);<br> this.r.document.writeln(&quot; targetObj.style.display = &quot;block&quot;;&quot;);<br> this.r.document.writeln(&quot; if (openTip &amp;&amp; shutTip) {&quot;);<br> this.r.document.writeln(&quot; sourceObj.innerHTML = openTip;&quot;);<br> this.r.document.writeln(&quot; }&quot;);<br> this.r.document.writeln(&quot; }&quot;);<br> this.r.document.writeln(&quot; }&quot;);<br> this.r.document.writeln(&quot; function setTab(name cursel n) {&quot;);<br> this.r.document.writeln(&quot; for (i = 1; i &lt;= n; i++) {&quot;);<br> this.r.document.writeln(&quot; var menu = document.getElementById(name + i);&quot;);<br> this.r.document.writeln(&quot; var con = document.getElementById(&quot;con_&quot; + name + &quot;_&quot; + i);&quot;);<br> this.r.document.writeln(&quot; menu.className = i == cursel ? &quot;hover&quot; : &quot;&quot;;&quot;);<br> this.r.document.writeln(&quot; con.style.display = i == cursel ? &quot;block&quot; : &quot;none&quot;;&quot;);<br> this.r.document.writeln(&quot; }&quot;);<br> this.r.document.writeln(&quot; }&quot;);<br> this.r.document.writeln(&quot; &lt;/script&gt;&quot;);<br> this.r.document.writeln(&quot; <div class=""Tab1"">&quot;);<br> this.r.document.writeln(&quot; <div class=""Menubox"">&quot;);<br> this.r.document.writeln(&quot; <ul>&quot;);<br> this.r.document.writeln(&quot; <li id=""one1"" onmousemove=""setTab('one'12)"" class=""hover"" style=""margin-right: 1px;"">&quot;);<br> this.r.document.writeln(&quot; 用户/<span id=""UserCount"">0</span></li>&quot;);<br> this.r.document.writeln(&quot; <li id=""one2"" onmousemove=""setTab('one'22)"" class="""">管理/<span id=""AdminCount"">0</span></li>&quot;);<br> this.r.document.writeln(&quot; <li style=""background: none; width: 10px; padding-left: 4px;""><a href=""#"" onclick=""openShutManager(this'box')"">&quot;);<br> this.r.document.writeln(&quot; <img src="""" + portraiturl + ""images/rig04.gif""></a></li>&quot;);<br> this.r.document.writeln(&quot; <li style=""background: none; width: 10px; padding-left: 4px;"">&quot;);<br> this.r.document.writeln(&quot; <img src="""" + portraiturl + ""images/rig05.gif""></li>&quot;);<br> this.r.document.writeln(&quot; </ul>&quot;);<br> this.r.document.writeln(&quot; </div>&quot;);<br> this.r.document.writeln(&quot; <div id=""box"" style=""display: none"" class=""rig01"">&quot;);<br> this.r.document.writeln(&quot; <div style=""float: left"">&quot;);<br> this.r.document.writeln(&quot; <img src="""" + portraiturl + ""images/rig07.gif""></div>&quot;);<br> this.r.document.writeln(&quot; <div class=""rig03"">&quot;);<br> this.r.document.writeln(&quot; <input type=""text"" style=""color: #999999; background: transparent; border: none"""");<br> this.r.document.writeln("" onfocus=""if(value==defaultValue){value='';this.style.color='#000'}"" onblur=""if(!value){value=defaultValue;this.style.color='#999'}"""");<br> this.r.document.writeln("" value=""请输入房间名"" size=""17""></div>&quot;);<br> this.r.document.writeln(&quot; <div style=""float: left; padding-left: 3px; padding-top: 3px;"">&quot;);<br> this.r.document.writeln(&quot; <a href=""#"">邀请好友</a></div>&quot;);<br> this.r.document.writeln(&quot; </div>&quot;);<br> this.r.document.writeln(&quot; <div class=""Contentbox"">&quot;);<br> this.r.document.writeln(&quot; <div id=""con_one_1"" style=""display: block;"">&quot;);<br> this.r.document.writeln(&quot; <table class='list' width=""100%"" border=""0"" id=""listtable_adm"" cellspacing=""5"">&quot;);<br> this.r.document.writeln(&quot; </table>&quot;);<br> this.r.document.writeln(&quot; <table class='list' width=""100%"" border=""0"" id=""listtable_vip"" cellspacing=""5"">&quot;);<br> this.r.document.writeln(&quot; </table>&quot;);<br> this.r.document.writeln(&quot; <table class='list' width=""100%"" border=""0"" id=""listtable_reg"" cellspacing=""5"">&quot;);<br> this.r.document.writeln(&quot; </table>&quot;);<br> this.r.document.writeln(&quot; <table class='list' width=""100%"" border=""0"" id=""listtable_other"" cellspacing=""5"">&quot;);<br> this.r.document.writeln(&quot; </table>&quot;);<br> this.r.document.writeln(&quot; </div>&quot;);<br> this.r.document.writeln(&quot; <div id=""con_one_2"" style=""display: none;"">&quot;);<br> this.r.document.writeln(&quot; <table class='list' width=""100%"" border=""0"" id=""listtable_adm"" cellspacing=""5"">&quot;);<br> this.r.document.writeln(&quot; </table>&quot;);<br> this.r.document.writeln(&quot; </div>&quot;);<br> this.r.document.writeln(&quot; </div>&quot;);<br> this.r.document.writeln(&quot; </div>&quot;);<br> this.r.document.writeln(&quot;</body></html>&quot;);<br> this.r.document.writeln(&quot;<script type=""text/javascript"">&quot;);<br> this.r.document.writeln(&quot; setTimeout('parent.BindListMenu();'5000);&quot;);<br> this.r.document.writeln(&quot;&lt;/script&gt;&quot;);<br> this.r.document.close();<br>}<br>writerframe();</p><p>function writeuserlist() {<br> if (listmode == 1) {<br> return;<br> }<br> if (sendrefresh == false) {<br> sendrefresh = true;<br> } else {<br> var count = Users.GetCount();<br> if ((count &lt; autorefresh_threshold) || (autorefreshuserlist == true) || (refreshclick == true) &amp;&amp; (listshow == 0)) {<br> // for (var i = 0; i &lt; list.length; i++) {<br> // delete list[i]; <br> // }<br> list = new Array();<br> list[0] = &quot;&quot;;<br> for (i = 0; i &lt; count; i++) {<br> //name-'adminmode-'usertype-'extinfo-'icon'-sex'-voice'-video<br> obj = Users.GetObject(i);<br> tmp = obj.name + &quot;-'&quot; + obj.adminmode + &quot;-'&quot; + obj.usertype + &quot;-'&quot; + obj.extinfo + &quot;-'&quot; + obj.icon + &quot;'-&quot; + obj.voice + &quot;'-&quot; + obj.video<br> list[i + 1] = tmp;<br> }<br> //list.sort();<br> if (this.d.loaded == 1) write();<br> if (refreshclick == true) {<br> refreshclick = false;<br> }<br> }<br> }<br> timerRunning = true;<br> timerID = setTimeout(&quot;refreshstart()&quot; nTimer * 1000);<br>}<br>function sortuser() {<br> user_sorted = new Array();<br> for (var i = 1; i &lt; list.length; i++) {<br> if (list[i] != &quot;&quot;) {<br> var lists_split = list[i].split(&quot;'-&quot;);</p><pre><code> if (!lists_split[1]) lists_split[1] = '0'; if (!lists_split[2]) lists_split[2] = '0'; var lists_split_2 = lists_split[0].split(&quot;-'&quot;); if (lists_split_2[1] != '1') lists_split_2[1] = '2'; if (lists_split_2[0].substr(0 1) == &quot;*&quot;) { usertype = &quot;0&quot;; } else { usertype = &quot;1&quot;; } userinfo = &quot;&quot;; user_str = lists_split_2[1]; user_str += &quot;&amp;&quot;; user_str += usertype; user_str += &quot;&amp;&quot;; user_str += userinfo; user_str += &quot;&amp;&quot;; user_str += lists_split_2[0]; user_str += &quot;&amp;&quot;; user_str += lists_split[1]; user_str += &quot;&amp;&quot;; user_str += lists_split[2]; user_str += &quot;&amp;&quot;; user_str += lists_split_2[3]; user_sorted[user_sorted.length] = user_str; }}user_sorted.sort();</code></pre><p>}<br>function writerframes() {<br> if (listmode == 1) {<br> return;<br> }<br> sortuser();<br> count = user_sorted.length;<br> if (this.r.document == null) return; this.r.document.open();<br> this.r.document.writeln(&quot;<html><head><meta http-equiv=""Content-Type"" content=""text/html; charset=gb2312"">&quot;);<br> this.r.document.writeln(&quot;<style type=text/css>&quot;);<br> this.r.document.writeln(&quot;&lt;!--&quot;);<br> this.r.document.writeln(&quot;.p9 { font-size: 9pt}&quot;);<br> this.r.document.writeln(&quot;body { font-size: 9pt; margin:0; padding:0; width:175px; overflow-x:hidden}&quot;);<br> this.r.document.writeln(&quot;td { font-size: 9pt}&quot;);<br> this.r.document.writeln(&quot;a { color: #0000FF; text-decoration: none}&quot;);<br> this.r.document.writeln(&quot;#bl_yh_lb{margin:0 0 0 3px; padding:0;width:175px;}&quot;);<br> this.r.document.writeln(&quot;#bl_yh_lb li{line-height:21px; height:21px; list-style-type:none; margin:0; padding:2px 0;}&quot;);<br> this.r.document.writeln(&quot;--&gt;&quot;);<br> this.r.document.writeln(&quot;</style>&quot;);<br> this.r.document.writeln(&quot;<div id=""Tips"" style=""position:absolute; left:0; top:0; width:130; display=none; z-index:2"">&quot;);<br> this.r.document.writeln(&quot; <p class="""">&nbsp;</p>&quot;);<br> this.r.document.writeln(&quot;</div>&quot;);<br> this.r.document.writeln(&quot;</head><body bgcolor=""#F3FFE1"" leftMargin=0>&quot;);<br> this.r.document.writeln(&quot;<div align=center id=""topbanner""><image src=http://"" + host + ""/bl/$E/upload/tb.gif border=0><br><font color=#FF0000><marquee width=140 scrolldelay=200>您好!欢迎您光临《$$title》网址:http://$E.abc.com</marquee></font></div>&quot;);<br> this.r.document.writeln(&quot;<div id=""chatbody"" class=""p9""><div style=""margin:3px; border-bottom:1px dashed #666666; ""> <a style=""float:right;"" accesskey=""n"" href=""javascript:"" onclick=""parent.d.document.getElementById('REFRESHUSERLIST').click()""><img src="""" + portraiturl + ""chattools/refresh.png"" alt=""刷新在线列表"" border=0 align=""absmiddle""></a>&quot;);<br> this.r.document.writeln(&quot;<a style=""float:right; margin:0 5px;"" accesskey=r href=""javascript:parent.cs('所有人')""><img src="""" + portraiturl + ""chattools/all.png"" alt=""所有人"" border=0 align=""absmiddle""></a><img src="""" + portraiturl + ""chattools/online.png"" alt=""在线人数"" align=""absmiddle""><font color=red>&quot; + count + &quot;</font></div>&quot;);<br> this.r.document.writeln(&quot;<ul id=""bl_yh_lb"">&quot;);<br> //alist=new Array();</p><pre><code>for (var i = 0; i &lt; count; i++) { this.r.document.writeln(&quot;&lt;li&gt;&quot;); var displayname; thislists = user_sorted[i].split(&quot;&amp;&quot;); thisadminmode = thislists[0]; thistype = thislists[1]; thisinfo = thislists[2]; thisname = thislists[3]; thisvoice = thislists[4]; thisvideo = thislists[5]; thisextinfo = thislists[6]; thisex = &quot;&quot;; if (thisadminmode != &quot;1&quot;) thisadminmode = &quot;0&quot;; displayname = new String(thisname); myportrait = &quot;&quot;; myicon = &quot;&quot;; if (thisextinfo != 0) t = thisextinfo; else t = &quot;&quot;; var infolist = new Array(&quot;&quot;); if (t != &quot;&quot; &amp;&amp; displayname.substr(0 1) == &quot;*&quot;) { infolist = t.split(&quot;:&quot;); if (!infolist[0]) { infolist[0] = &quot;&quot; }; if (!infolist[1]) { infolist[1] = &quot;&quot; }; if (!infolist[2]) { infolist[2] = &quot;&quot; }; myportrait = infolist[0]; myicon = infolist[1]; } userinfo0 = getptid(thisname myportrait thisadminmode) userinfo = userinfo0.split(&quot;t&quot;); styletext = &quot;&quot; title = &quot;&quot;; adminmode_ret = thisadminmode; if (userinfo.length &gt;= 1) { ptid = userinfo[0]; if (userinfo.length &gt;= 2) { styletext = userinfo[1]; if (userinfo.length &gt;= 3) { title = userinfo[2]; if (userinfo.length &gt;= 4) { adminmode_ret = userinfo[3]; if (userinfo.length == 5) { title = userinfo[4]; } } } } } else { ptid = userinfo0; } if (showicon == true) { portrait = &quot;&lt;image src=&quot; + ptid + &quot;.gif border=0 align=absmiddle&gt;&quot;; } else portrait = &quot;&quot;; if (thisvoice == 1) { voicenote = &quot;&lt;font face=&quot;Wingdings&quot; color=#009900&gt;(&lt;/font&gt;&quot;; nametitle = thisname + &quot; 开麦&quot;; } else if (thisvoice == 2) { voicenote = &quot;&lt;font face=&quot;Wingdings&quot; color=black&gt;(&lt;/font&gt;&quot;; nametitle = thisname + &quot; 双工&quot;; } else { voicenote = &quot;&quot;; nametitle = thisname + &quot; 关麦&quot;; } if (adminmode_ret == 1) { nametitle += &quot; 在线管理员&quot;; } if (title != &quot;&quot;) { nametitle += &quot; &quot; + title; } if (nametitle != &quot;&quot;) nametitle = &quot; title=&quot;&quot; + nametitle + &quot;&quot;&quot;; if (adminmode_ret == 1) { //alist[alist.length]=thisname; if (styletext == &quot;&quot;) { styletext = &quot;color:red;&quot;; displayname += &quot;&lt;font color=red&gt;*&lt;/font&gt;&quot;; } else { displayname += &quot;*&quot;; } } if (styletext == &quot;0&quot;) styletext = &quot;&quot;; if (styletext) { displayname = &quot;&lt;span style='&quot; + styletext + &quot;'&gt;&quot; + displayname + &quot;&lt;/span&gt;&quot;; } this.r.document.writeln(portrait + &quot;&lt;a target=d href=&quot;javascript:parent.cs('&quot; + thisname + &quot;')&quot; &quot; + nametitle + &quot;&gt;&quot; + displayname + &quot;&lt;/a&gt;&quot;); this.r.document.writeln(voicenote); if (thisvideo == 1) { this.r.document.writeln(&quot;&lt;font face=&quot;Webdings&quot; color=000000&gt;N&lt;/font&gt;&quot;); } this.r.document.writeln(&quot;&lt;/li&gt;&quot;);}this.r.document.writeln(&quot;&lt;/ul&gt;&quot;);this.r.document.writeln(&quot;&lt;/div&gt;&lt;div align=center id='bottombanner' style='border:0px solid #000000;padding:0;POSITION: relative; Left: 0px; TOP: 0px; HEIGHT: 40px; WIDTH: 130px;'&gt;&lt;/div&gt;&quot;);this.r.document.writeln('&lt;/body&gt;&lt;/html&gt;');this.r.document.close();</code></pre><p>}<br>//////////////<br>function getptid(username portrait adminmode) {<br> style = &quot;&quot;;<br> return portraiturl + portrait + &quot;t&quot; + style;<br>}</p><p>var ListTable = [&quot;listtable_adm&quot; &quot;listtable_vip&quot; &quot;listtable_reg&quot; &quot;listtable_other&quot;];<br>var ListUserCount = 0;<br>var Order = false;<br>window.setInterval(function () {<br> var num = Users.GetCount();<br> if (num - ListUserCount &lt; 30 &amp;&amp; ListUserCount - num &lt; 30 &amp;&amp; !Order) {<br> for (var s = 0; s &lt; ListTable.length; s++) {<br> var listtable = this.r.document.getElementById(ListTable[s]);<br> var p_length = listtable.rows.length;<br> for (var i = 0; i &lt;= p_length - 2; i++) {<br> for (var j = p_length - 1; j &gt;= 1; j--) {<br> if (listtable.rows[j].level &lt; listtable.rows[j - 1].level) {<br> Swap(listtable j j - 1);<br> }<br> }<br> }<br> }<br> Order = true;<br> }<br> else if (ListUserCount != num) {<br> Order = false;<br> ListUserCount = num;<br> }<br>} 3000);</p><p>parent.refreshstop = refreshstop;<br>parent.refreshstart = refreshstart;<br>parent.Users_Add = Users_Add;<br>parent.Users_Add1 = Users_Add1;<br>parent.newlogin = newlogin;<br>parent.Users_Del = Users_Del;<br>parent.Users_GetID = Users_GetID;<br>var Users = new UserList();<br>parent.dodeluserfromlist = dodeluserfromlist;<br>parent.checkvipuser = checkvipuser;<br>parent.getlist = getlist;<br>parent.addusertolist = addusertolist;<br>parent.deluserfromlist = deluserfromlist;<br>parent.removealluserfromlist = removealluserfromlist;<br>parent.dolistparse = dolistparse;<br>parent.RefreshUsers = RefreshUsers;<br>parent.writerframe = writerframe;<br>parent.writeuserlist = writeuserlist;<br>parent.sortuser = sortuser;<br>parent.write = write;<br>parent.getptid = getptid;</p><p>function showElement(elementId) {<br> document.getElementById(elementId).style.display = &quot;block&quot;;<br> }<br> function hideElement(elementId) {<br> document.getElementById(elementId).style.display = &quot;none&quot;;<br> }</p>

解决方案

你这个代码是在js文件里面还是script标签里面的?如果script标签里面你下面这句要对script结束标签转义下,要不会导致代码截断而出错

 this.r.document.writeln(""    </script>"");

==>

 this.r.document.writeln(""    </script>"");

解决方案二:
你的代码打印出来是这样子的:
</body></html> 没有开始标签?

     <script type=""text/javascript"">        function openShutManager(oSourceObj oTargetObj shutAble oOpenTip oShutTip) {            var sourceObj = typeof oSourceObj == ""string"" ? document.getElementById(oSourceObj) : oSourceObj;            var targetObj = typeof oTargetObj == ""string"" ? document.getElementById(oTargetObj) : oTargetObj;            var openTip = oOpenTip || """";            var shutTip = oShutTip || """";            if (targetObj.style.display != ""none"") {                if (shutAble) return;                targetObj.style.display = ""none"";                if (openTip && shutTip) {                    sourceObj.innerHTML = shutTip;                }            } else {                targetObj.style.display = ""block"";                if (openTip && shutTip) {                    sourceObj.innerHTML = openTip;                }            }        }        function setTab(name cursel n) {            for (i = 1; i <= n; i++) {                var menu = document.getElementById(name + i);                var con = document.getElementById(""con_"" + name + ""_"" + i);                menu.className = i == cursel ? ""hover"" : """";                con.style.display = i == cursel ? ""block"" : ""none"";            }        }    </script>    <div class=""Tab1"">        <div class=""Menubox"">            <ul>                <li id=""one1"" onmousemove=""setTab('one'11)"" class=""hover"" style=""margin-right: 1px;"">                    用户/<span id=""UserCount"">0</span></li>                <li style='display:none;' id=""one2"" onmousemove=""setTab('one'22)"" class="""">管理/<span id=""AdminCount"">0</span></li>                <li style=""background: none; width: 10px; padding-left: 4px;""><a href=""#"" onclick=""openShutManager(this'box')"">                    <img src=""testimages/rig04.gif""></a></li>                <li style=""background: none; width: 10px; padding-left: 4px;"">                    <img src=""testimages/rig05.gif""></li>            </ul>        </div>        <div id=""box"" style=""display: none"" class=""rig01"">            <div style=""float: left"">                <img src=""testimages/rig07.gif""></div>            <div class=""rig03"">                <input type=""text"" style=""color: #999999; background: transparent; border: none""                    onfocus=""if(value==defaultValue){value='';this.style.color='#000'}"" onblur=""if(!value){value=defaultValue;this.style.color='#999'}""                    value=""请输入房间名"" size=""17""></div>            <div style=""float: left; padding-left: 3px; padding-top: 3px;"">                <a href=""#"">邀请好友</a></div>        </div>        <div class=""Contentbox"">            <div id=""con_one_1"" style=""display: block;"">                <table class='list' width=""100%"" border=""0"" id=""listtable_adm"" cellspacing=""5"">                </table>                <table class='list' width=""100%"" border=""0"" id=""listtable_vip"" cellspacing=""5"">                </table>                <table class='list' width=""100%"" border=""0"" id=""listtable_reg"" cellspacing=""5"">                </table>                <table class='list' width=""100%"" border=""0"" id=""listtable_other"" cellspacing=""5"">                </table>            </div>            <div id=""con_one_2"" style=""display: none;"">                <table class='list' width=""100%"" border=""0"" id=""listtable_adm"" cellspacing=""5"">                </table>            </div>        </div>    </div></body></html>
时间: 2024-08-29 12:08:32

typeof-帮忙看看为何管理那块不显示呢 是在JS文件里的的相关文章

c++实现自动的管理内存块实例代码

本文将来解决这样一个问题:复制一个对象的意义是什么? 假如一个对象的副本是一个完全不同的对象,这个副本具有原先对象的所有属性.然而,如果一个对象指向另一个对象的话,这个问题就变得更复杂:如果一个对象x指向一个对象y,那么复制x的时候是否也应该复制对象y呢?有时候这个问题很明显:如果y是x的一个成员,我们就必须在复制x的时候也复制y,如果x仅仅是一个指针,搞好指向y,那么我们就不需要复制y. 在这里我们定义了三种指针一样的类,他们在如何定义复制操作上互不相同. 一.一种管理内存的句柄类:复制所指向

js调试-菜鸟请高手帮忙看看两个JS文件为什么会冲突

问题描述 菜鸟请高手帮忙看看两个JS文件为什么会冲突 文件一: var ddsmoothmenu={ //Specify full URL to down and right arrow images (23 is padding-right added to top level LIs with drop downs): arrowimages: {down:['downarrowclass', 'images/down.gif', 10], right:['rightarrowclass',

看了协众移动协同办公管理软件视频教程,可以用手机oa审批文件,这对手机的配置有要求?

问题描述 看了协众移动协同办公管理软件视频教程,可以用手机oa审批文件,这对手机的配置有要求? 看了协众移动协同办公管理软件视频教程,可以用手机oa审批文件,这对手机的配置有要求?

scrollpane-使用ScrollPane默认的BorderLayout布局管理器,只显示最后一个?(请前辈们指教)

问题描述 使用ScrollPane默认的BorderLayout布局管理器,只显示最后一个?(请前辈们指教) import java.awt.BorderLayout;import java.awt.Button;import java.awt.Frame;import java.awt.ScrollPane; public class ScrollPaneTest { public static void main(String[] args){ Frame frame = new Frame

c# 4 0-vs 2010 写的图片管理 应用程序。用 vs 2010 生成安装文件,安装后打开时提示错误

问题描述 vs 2010 写的图片管理 应用程序.用 vs 2010 生成安装文件,安装后打开时提示错误 问题事件名称: CLR20r3 问题签名 01: pictureview.exe 问题签名 02: 1.0.0.0 问题签名 03: 548ba10c 问题签名 04: mscorlib 问题签名 05: 4.0.30319.18444 问题签名 06: 52717edc 问题签名 07: 314 问题签名 08: 4f 问题签名 09: System.ArgumentOutOfRange

js文件-帮忙看看这样的JS文件如何在ASP页调用显示如下结果

问题描述 帮忙看看这样的JS文件如何在ASP页调用显示如下结果 function Flash_Car_Ex(name, carname, carswfhost, carswf) { parent.d.writemsg("u", "<font color=#00bb00>: " + name + " " + carname + " </font>"); parent.ShowMagicFace(carsw

javascript-怎么将jsp中list变量传给js文件,求大神帮帮忙

问题描述 怎么将jsp中list变量传给js文件,求大神帮帮忙 从后台action传了一个List类型的值bxLists给了jsp页面, 然后我还要将该值传给另一个js文件处理,我先在jsp页面将该值隐藏起来了 jsp页面如下: <input type="hidden" id="bxlists" name="bxlists" value="${bxLists}"/> 然后在js页面定义了一个数组接收 js页面如下:

《Drupal实战》——2.4 管理作者字段的显示

2.4 管理作者字段的显示 现在让我们创建第一份图书信息<平凡的世界>,作者路遥,这是我很喜欢的一本长篇小说.我们从网络上收集相关的信息来充实这一图书信息.创建好这一图书信息以后,我们看看它的具体样子,以作者信息为例,如图2-75所示. 这样的显示形式显然不是我们想要的.我们希望的显示是"作者: 路遥 著".我们导航到field collection模块的管理界面,单击field_author的"管理显示"链接,进入管理显示页面,如图2-76所示. 将其

求高手帮帮忙看一个“Swing的图片不显示”类型的故障原因.

问题描述 高手,我弄了一个Java的类型:高手,我弄了一个Java的类型:高手,我弄了一个Java的类型:importjava.awt.AWTEvent;importjava.awt.Toolkit;importjava.awt.event.AWTEventListener;importjava.awt.event.KeyEvent;importjava.net.URL;importjava.util.HashMap;importjavax.swing.ImageIcon;importjavax