?? linux c xml 編程。。_xcwen_lupa開源社區.mht
字號:
document.body.appendChild(divElement);
}
divElement.className =3D "xspace-ajaxdiv";
divElement.style.cssText =3D "width:400px;";
=09
var offX =3D 4;
var offY =3D 4;
var width =3D 0;
var height =3D 0;
var scrollX =3D 0;
var scrollY =3D 0; =20
var x =3D 0;
var y =3D 0;
=09
if (window.innerWidth) width =3D window.innerWidth - 18;
else if (document.documentElement && =
document.documentElement.clientWidth)=20
width =3D document.documentElement.clientWidth;
else if (document.body && document.body.clientWidth)=20
width =3D document.body.clientWidth;
=09
=09
if (window.innerHeight) height =3D window.innerHeight - 18;
else if (document.documentElement && =
document.documentElement.clientHeight)=20
height =3D document.documentElement.clientHeight;
else if (document.body && document.body.clientHeight)=20
height =3D document.body.clientHeight;
=09
if (typeof window.pageXOffset =3D=3D "number") scrollX =3D =
window.pageXOffset;
else if (document.documentElement && =
document.documentElement.scrollLeft)
scrollX =3D document.documentElement.scrollLeft;
else if (document.body && document.body.scrollLeft)=20
scrollX =3D document.body.scrollLeft;=20
else if (window.scrollX) scrollX =3D window.scrollX;
=09
=20
if (typeof window.pageYOffset =3D=3D "number") scrollY =3D =
window.pageYOffset;
else if (document.documentElement && =
document.documentElement.scrollTop)
scrollY =3D document.documentElement.scrollTop;
else if (document.body && document.body.scrollTop)=20
scrollY =3D document.body.scrollTop;=20
else if (window.scrollY) scrollY =3D window.scrollY;
=09
x=3De.pageX?e.pageX:e.clientX+scrollX;
y=3De.pageY?e.pageY:e.clientY+scrollY;
if(x+divElement.offsetWidth+offX>width+scrollX){
x=3Dx-divElement.offsetWidth-offX;
if(x<0)x=3D0;
}else x=3Dx+offX;
if(y+divElement.offsetHeight+offY>height+scrollY){
y=3Dy-divElement.offsetHeight-offY;
if(y<scrollY)y=3Dheight+scrollY-divElement.offsetHeight;
}else y=3Dy+offY;
divElement.style.left =3D x+"px";
divElement.style.top =3D y+"px";
=09
}
function tagshow(e, tagname) {
getTipDiv(e);
var x =3D new Ajax('statusid', 'XML');
=09
x.get(siteUrl+'/batch.tagshow.php?tagname=3D'+tagname, function(s){
divElement =3D getbyid("xspace-tipDiv");
divElement.innerHTML =3D s.lastChild.firstChild.nodeValue;
});
}
function joinfriend(uid) {
var x =3D new Ajax('statusid', 'XML');
=09
x.get(siteUrl+'/batch.common.php?action=3Djoinfriend&uid=3D'+uid, =
function(s){
alert(s.lastChild.firstChild.nodeValue);
});
}
function deletetrack(itemid) {
var x =3D new Ajax('statusid', 'XML');
x.get(siteUrl+'/batch.track.php?action=3Ddelete&itemid=3D'+itemid, =
function(s){
alert(s.lastChild.firstChild.nodeValue);
});
}
function taghide() {
var tip =3D getbyid("xspace-tipDiv");
tip.style.display =3D 'none';
}
function addFirstTag() {
var lists=3Dnew Array;
lists=3Ddocument.getElementsByTagName('ul');
for(i=3D0;i<lists.length;i++){
lists[i].firstChild.className+=3D' first-child';
}
}
function setTab(area,id) {
var tabArea=3Ddocument.getElementById(area);
var contents=3DtabArea.childNodes;
for(i=3D0; i<contents.length; i++) {
=
if(contents[i].className=3D=3D'tabcontent'){contents[i].style.display=3D'=
none';}
}
document.getElementById(id).style.display=3D'';
var =
tabs=3Ddocument.getElementById(area+'tabs').getElementsByTagName('span');=
for(i=3D0; i<tabs.length; i++) { tabs[i].className=3D''; }
document.getElementById(id+'tab').className=3D'active';
}
function ColExpIntro(obj) {
var thisIntro=3Dobj.parentNode.getElementsByTagName('p')[0];
if(thisIntro.style.display=3D=3D'none'){
thisIntro.style.display=3D'';
}else{
thisIntro.style.display=3D'none';
}
}
function ColExpAllIntro(obj) {
var ctrlText=3Ddocument.getElementById('ColExpAllIntroText');
var Intros=3Dobj.parentNode.parentNode.getElementsByTagName('p');
if(ctrlText.innerHTML=3D=3D'=CF=D4=CA=BE=D5=AA=D2=AA'){
ctrlText.innerHTML=3D'=D2=FE=B2=D8=D5=AA=D2=AA';
for(i=3D0;i<Intros.length;i++){
Intros[i].style.display=3D'';
}
}else{
ctrlText.innerHTML=3D'=CF=D4=CA=BE=D5=AA=D2=AA';
for(i=3D0;i<Intros.length;i++){
Intros[i].style.display=3D'none';
}
}
}
function OpenWindow(url, winName, width, height) {
xposition=3D0; yposition=3D0;
if ((parseInt(navigator.appVersion) >=3D 4 )) {
xposition =3D (screen.width - width) / 2;
yposition =3D (screen.height - height) / 2;
}
theproperty=3D "width=3D" + width + ","
+ "height=3D" + height + ","
+ "location=3D0,"
+ "menubar=3D0,"
+ "resizable=3D1,"
+ "scrollbars=3D1,"
+ "status=3D0,"
+ "titlebar=3D0,"
+ "toolbar=3D0,"
+ "hotkeys=3D0,"
+ "screenx=3D" + xposition + "," //=BD=F6=CA=CA=D3=C3=D3=DANetscape
+ "screeny=3D" + yposition + "," //=BD=F6=CA=CA=D3=C3=D3=DANetscape
+ "left=3D" + xposition + "," //IE
+ "top=3D" + yposition; //IE=20
window.open(url, winName, theproperty);
}
function joinfavorite(itemid) {
var x =3D new Ajax('statusid', 'XML');
x.get(siteUrl + =
'/batch.common.php?action=3Djoinfavorite&itemid=3D'+itemid, function(s) =
{
alert(s.lastChild.firstChild.nodeValue);
});
}
function showajaxdiv(action, url, width) {
var x =3D new Ajax('statusid', 'XML');
x.get(url, function(s) {
if(getbyid("xspace-ajax-div-"+action)) {
var divElement =3D getbyid("xspace-ajax-div-"+action);
} else {
var divElement =3D document.createElement("DIV");
divElement.id =3D "xspace-ajax-div-"+action;
divElement.className =3D "xspace-ajaxdiv";
document.body.appendChild(divElement);
}
divElement.style.cssText =3D "width:"+width+"px;";
var userAgent =3D navigator.userAgent.toLowerCase();
var is_opera =3D (userAgent.indexOf('opera') !=3D -1);
var clientHeight =3D scrollTop =3D 0;=20
if(is_opera) {
clientHeight =3D document.body.clientHeight /2;
scrollTop =3D document.body.scrollTop;
} else {
clientHeight =3D document.documentElement.clientHeight /2;
scrollTop =3D document.documentElement.scrollTop;
}
divElement.innerHTML =3D s.lastChild.firstChild.nodeValue;
divElement.style.left =3D (document.documentElement.clientWidth /2 =
+document.documentElement.scrollLeft - width/2)+"px";
divElement.style.top =3D (clientHeight +=A1=A1scrollTop - =
divElement.clientHeight/2)+"px";
=09
});=09
}
function getMsg() {
if (GetCookie('readMsg')!=3D'1') {
var msgDiv =3D document.createElement('div');
msgDiv.id =3D 'xspace-sitemsg';
msgDiv.innerHTML =3D "<h6><a href=3D'javascript:;' =
onclick=3D'closeMsg();' =
class=3D'xspace-close'>=B9=D8=B1=D5</a>=B9=AB=B8=E6:</h6><div>"+siteMsg+"=
<p class=3D'xspace-more'><a =
href=3D'"+siteUrl+"/index.php?action_announcement' =
target=3D'_blank'>MORE</a></p></div>";
document.body.insertBefore(msgDiv,document.body.firstChild);
=09
showMsg();
}
}
function floatMsg() {
window.onscroll =3D function() {
document.getElementById('xspace-sitemsg').style.bottom =3D '10px';
document.getElementById('xspace-sitemsg').style.background =3D =
'#EEF0F6';
}
}
function showMsg() {
var vh =3D document.getElementById('xspace-sitemsg').style.bottom;
if (vh=3D=3D'') {vh=3D'-180px'}
var vhLen =3D vh.length-2;
var vhNum =3D parseInt(vh.substring(0,vhLen));
=09
if (vhNum<10) {
document.getElementById('xspace-sitemsg').style.bottom =3D =
(vhNum+5)+'px';
showvotetime =3D setTimeout("showMsg()",1);
} else {
floatMsg();
}
}
function closeMsg() {
document.getElementById('xspace-sitemsg').style.display =3D 'none';
CreatCookie('readMsg','1');
}
/*Cookie=B2=D9=D7=F7*/
function CreatCookie(sName,sValue){
var expires =3D function(){ //Cookie=B1=A3=C1=F4=CA=B1=BC=E4
var mydate =3D new Date();
mydate.setTime(mydate.getTime + 3*30*24*60*60*1000);
return mydate.toGMTString();
}
document.cookie =3D sName + "=3D" + sValue + ";expires=3D" + expires;
}
function GetCookieVal(offset) =
{//=BB=F1=B5=C3Cookie=BD=E2=C2=EB=BA=F3=B5=C4=D6=B5
var endstr =3D document.cookie.indexOf (";", offset);
if (endstr =3D=3D -1)
endstr =3D document.cookie.length;
return unescape(document.cookie.substring(offset, endstr));
}
function GetCookie(sName) {//=BB=F1=B5=C3Cookie
var arg =3D sName + "=3D";
var alen =3D arg.length;
var clen =3D document.cookie.length;
var i =3D 0;
while (i < clen)
{
var j =3D i + alen;
if (document.cookie.substring(i, j) =3D=3D arg)
return GetCookieVal (j);
i =3D document.cookie.indexOf(" ", i) + 1;
if (i =3D=3D 0) break;
}
return null;
}
function DelCookie(sName,sValue){ //=C9=BE=B3=FDCookie
document.cookie =3D sName + "=3D" + escape(sValue) + ";expires=3DFri, =
31 Dec 1999 23:59:59 GMT;";
}
//=CF=D4=CA=BE=B9=A4=BE=DF=CC=F5
function hidetoolbar() {
=
window.parent.document.getElementById("toolbarframe").style.display=3D"no=
ne";
}
function showtoolbar() {
document.getElementById("toolbarframe").style.display =3D "block";
}
function mngLink(obj) {
var wrap =3D window.parent.document.getElementById('wrap');
if(wrap =3D=3D null) {
=
alert('=B1=BE=B0=B4=C5=A5=BD=F6=B6=D4=CD=CF=D7=A7=C4=A3=B0=E5=D3=D0=D0=A7=
=A3=A1');
return false;
}
if (wrap.className=3D=3D'') {
wrap.className =3D 'hidemnglink';
obj.innerHTML =3D '=CF=D4=CA=BE=B1=E0=BC=AD=B0=B4=C5=A5';
} else {
wrap.className =3D '';
obj.innerHTML =3D '=D2=FE=B2=D8=B1=E0=BC=AD=B0=B4=C5=A5';
}
}
//=B8=B4=D6=C6URL=B5=D8=D6=B7
function setCopy(_sTxt){
if(navigator.userAgent.toLowerCase().indexOf('ie') > -1) {
clipboardData.setData('Text',_sTxt);
alert =
("=CD=F8=D6=B7=A1=B0"+_sTxt+"=A1=B1\n=D2=D1=BE=AD=B8=B4=D6=C6=B5=BD=C4=FA=
=B5=C4=BC=F4=CC=F9=B0=E5=D6=D0\n=C4=FA=BF=C9=D2=D4=CA=B9=D3=C3Ctrl+V=BF=EC=
=BD=DD=BC=FC=D5=B3=CC=F9=B5=BD=D0=E8=D2=AA=B5=C4=B5=D8=B7=BD");
} else {
prompt("=C7=EB=B8=B4=D6=C6=CD=F8=D5=BE=B5=D8=D6=B7:",_sTxt);=20
}
}
//=BC=D3=C8=EB=CA=D5=B2=D8
function addBookmark(site, url){
if(navigator.userAgent.toLowerCase().indexOf('ie') > -1) {
window.external.addFavorite(url,site)
} else if (navigator.userAgent.toLowerCase().indexOf('opera') > -1) {
alert =
("=C7=EB=CA=B9=D3=C3Ctrl+T=BD=AB=B1=BE=D2=B3=BC=D3=C8=EB=CA=D5=B2=D8=BC=D0=
");
} else {
alert =
("=C7=EB=CA=B9=D3=C3Ctrl+D=BD=AB=B1=BE=D2=B3=BC=D3=C8=EB=CA=D5=B2=D8=BC=D0=
");
}
}
//=C6=C0=B7=D6
function setRate(value) {
getbyid('xspace-ratevalue').value =3D value;
getbyid('xspace-rates').className =3D 'xspace-rates'+value;
}
function adclick(id) {
var x =3D new Ajax('statusid', 'XML');
x.get(siteUrl + '/batch.common.php?action=3Dadclick&id=3D'+id, =
function(s){});
}
function display(id) {
dobj =3D getbyid(id);
if(dobj.style.display =3D=3D 'none' || dobj.style.display =3D=3D '') {
dobj.style.display =3D 'block';
} else {
dobj.style.display =3D 'none';
}
}
//=CF=D4=CA=BE=D2=FE=B2=D8=C3=BD=CC=E5
function addMediaAction(div) {
var medias =3D getbyid(div).getElementsByTagName('kbd');
for (i=3D0;i<medias.length;i++) {
if(medias[i].className=3D=3D'showvideo' || =
medias[i].className=3D=3D'showflash') {
medias[i].onclick =3D function() {showmedia(this,400,400)};
}
}
}
function showmedia(Obj, mWidth, mHeight) {
var mediaStr, smFile;
if ( Obj.tagName.toLowerCase()=3D=3D'a' ) { smFile =3D Obj.href; } else =
{ smFile =3D Obj.title; }
var smFileType =3D Obj.className.toLowerCase();
switch(smFileType){
case "showflash":
mediaStr=3D"<p style=3D'text-align: right; margin: 0.3em 0; width: =
400px;'>[<a href=3D'"+smFile+"' =
target=3D'_blank'>=C8=AB=C6=C1=B9=DB=BF=B4</a>]</p><object =
codeBase=3D'http://download.macromedia.com/pub/shockwave/cabs/flash/swfla=
sh.cab#version=3D7,0,0,0' =
classid=3D'clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' width=3D'400' =
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -