var iconwar = " ";
var iconload = " ";
var badstr = "!&^#|%$)(- /?@`~';:{}[],=".\";
var badsql = "!&^| /?`~'=";
var $show = function (e) {try{document.getElementById(e).style.display="";} catch(e) {} };
var $hide = 함수 (e) {try{document.getElementById(e).style.display="none";} catch(e) {} };
var $W = document.write; var reurl,js_UserName;
reurl = document.referrer;
if (reurl=="")
{
reurl = "/index.html"; (id) {
if (document.getElementById(id).style.display == '없음') {
$show(id)
}
else {
$hide( id);
}
function onLabelTxt(id,LabelID,ShowTxt,HideTxt) {
if (document.getElementById(id).style.display == '없음') {
$show(id);
document.getElementById(LabelID).value = HideTxt;
}
else {
$hide(id); = ShowTxt;
}
}
function listdisp(tid,lid) {
if (document.getElementById(tid).style.display == 'none') {
$show( tid);
}
else {
$hide(tid);
}
if (lid == 't1') {
return 't1_off';
}
else if (lid == 't2') {
return 't2_off';
}
else if (lid == 't1_off') {
return 't1';
}
else if (lid == 't2_off') {
return 't2';
}
}
function trim(str) {
return (str '').replace(/(s )$/g, '').replace(/ ^s /g, '');
}
function addbookmark(url, site){
if(is_ie) {
window.external.addFavorite(url, site);
} else {
alert('북마크를 추가하려면 'Ctrl D'를 누르세요.');
}
}
//AJAX_START
var xmlhttp=null;
function createxmlhttp(){
시도해 보세요 {
xmlhttp=new ActiveXObject("Msxml2.xmlhttp") ;
}
catch(e) {
시도해 보세요 {
xmlhttp=new ActiveXObject("Microsoft.xmlhttp") ;
}
catch(oc) {
xmlhttp=null ;
}
}
if ( !xmlhttp && typeof XMLHttpRequest != "정의되지 않음" ) {
xmlhttp = new XMLHttpRequest();
}
if (!xmlhttp) {
alert("您的浏览器不支AJAX特性,本页某些功能将无法正常使用!");
}
}
//js操작cookies函数 ************************
function delcookie(이름){
setcookie(이름, "");
}
function getcookie(이름) {
var cookie_start = document.cookie.indexOf(이름);
var cookie_end = document.cookie.indexOf(";", cookie_start);
return cookie_start == -1 ? '' : unescape(document.cookie.substring(cookie_start name.length 1, (cookie_end > cookie_start ? cookie_end : document.cookie.length)));
}
함수 setcookie(cookieName, cookieValue, 초) {
var expires = new Date();
var path = "/";
var 도메인 = "alixixi.com";
var secure = "";
expires.setTime(expires.getTime() 초);
(path? '; path ='path : '/')
(도메인 ? '; domain=' 도메인 : '')
(보안됨 ? '; 보안됨' : '');
}
//GetQueryString ************************
var LocString=String(window.document.location. href);
함수 GetQueryString(str){
var rs=new RegExp("(^|)" str "=([^&]*)(&|$)","gi").exec(LocString) ,tmp;
if(tmp=rs)return tmp[2];
' ' 반환;
}
//VScroll 显示上翻单条标题************************
함수 _ge(a) {return document.getElementById?document.getElementById(a):null;}
함수 VScroll() {
var m_box = null;
var m_lineHeight = 0;
var m_lineNum = 0;
var m_splitStr = '';
var m_speed = 0;
var m_delay = 0;
var m_pos = 0;
var m_stopTimes = 0;
var m_stop = false;
this.init = function(box,lnum,lheight,speed,delay,split) {
m_box = _ge(box);
m_lineNum = lnum;
m_lineHeight = lheight;
m_speed = 속도;
m_delay = 지연;
m_splitStr = 분할;
}
this.play = function() {
if ( m_stop ) {
return;
}
m_pos = m_box.scrollTop;
if( m_pos % m_lineHeight == 0 && m_stopTimes m_stopTimes ;
} else { m_box.scrollTop ;
if ( m_pos % m_lineHeight == 0 && m_stopTimes >= m_delay ) {
m_stopTimes = 0;
}
}
if ( m_box.scrollTop > m_lineHeight * m_lineNum ) {
m_box.scrollTop = 0;
}
}
this.show = function () {
setInterval( m_self ".play()", m_speed );
}
this.setSelf = function(n) {
m_self = n;
}
this.stop = function(n) {
m_stop = n;
}
}
function show_date() {
var today = new Date();
var day = new Array();
var str = '';
일[0] = "일";
일[1] = "一";
일[2] = "두";
일[3] = "三";
일[4] = "4";
일[5] = "五";
일[6] = "六";
str = today.getFullYear();
str = "년";
str = today.getMonth() 1;
str = "월";
str = today.getDate();
str = "일";
str = " ";
str = "별期";
str = day[today.getDay()];
return str;
}
function ajaxPost(url,stateurl,data,info,loading){
var url,stateurl,data,info,loading
createxmlhttp();
if (data=="" || data==null)
{
//getMode
xmlhttp.open("get",url,true);
xmlhttp.setRequestHeader("CONTENT-TYPE","application/x-www-form-urlencoded");
xmlhttp.onreadystatechange= function () { checkState(stateurl,info,loading); } ;
xmlhttp.send(null);
}
else
{
//postMode
xmlhttp.open("post",url, true, "", "");
xmlhttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
xmlhttp.onreadystatechange= function () { checkState(stateurl,info,loading); }
xmlhttp.send(data);
}
}
함수 checkState(stateurl,info,loadnews){
if (xmlhttp.readyState == 4){
document.getElementById(info).innerHTML = loadnews;
if(xmlhttp.status == 200){
var retext = xmlhttp.responseText.split("$");
document.getElementById(info).innerHTML=retext[1];
스위치(retext[0]) {
case "usreg" : if(stateurl!=="")location.href=stateurl;
휴식;
case 'uslogin' : if(stateurl!=="")location.href=stateurl;
휴식;
케이스 '활성' : location.href=retext[2];
휴식;
case 'errinfo' : 반환 false;
휴식;
기본값 : document.getElementById(info).innerHTML=retext[0];
}
}
}
else{
document.getElementById(info).innerHTML=loadnews;
}
}
//AJAX_END
//运行代码
function runEx(cod1) {
cod=document.getElementById(cod1)
var code=cod.value;
if (code!=""){
var newwin=window.open('','','');
newwin.opener = null
newwin.document.write(코드);
newwin.document.close();
}
}
//复제대码
함수 doCopy2(ID) {
if (document.all){
textRange = document.getElementById(ID).createTextRange();
textRange.execCommand("복사");
alert('제조성공');
}
else{
alert("此功能只能在IE上有效")
}
}
//复 제조사 代码
함수 doCopy(obj) {
var rng = document.body.createTextRange();
rng.moveToElementText(obj);
rng.scrollIntoView();
rng.select();
rng.execCommand("복사");
rng.collapse(false);
}
함수 doCopyUrl()
{
document.getElementById("CopyUrl").value=parent.location.href;
document.getElementById("CopyUrl").select();
document.execCommand("복사");
alert("网址成功复到剪贴板!")
}
//另存代码
function doSave(obj) {
var winname = window.open('', '_blank', 'top=10000');
winname.document.open('text/html', 'replace');
winname.document.writeln(obj.value);
winname.document.execCommand('saveas','',' code.htm');
winname.close();
function findobj(n, d) {
var p, i, x; ) d = document;
if((p = n.indexOf("?"))>0 && parent.frames.length) {
d = parent.frames[n.substring(p 1)]. 문서;
n = n.substring(0, p);
}
if(x != d[n] && d.all) x = d.all[n]; (i = 0; !x && i for(i = 0; !x && d.layers && i if(!x && document.getElementById) x = document.getElementById(n); 🎜>}
함수 제출(theform){ //if IE 4 or NS 6 if (document.all||document.getElementById){
//양식의 모든 요소를 통해 화면 표시 , (i=0;i
if(tempobj.type. toLowerCase()=="submit"||tempobj.type.toLowerCase()=="reset")
//disable em
tempobj.disabled=true
}
}
함수 openScript(url, width, height){
var Win = window.open(url,"openScript",'width=' width ',height=' height ',resizing=1,scrollbars=yes, 메뉴바=아니요,상태=예' );
}
함수 CheckAll(form) {
for (var i=0;i
if (e.name != 'chkall') e.checked = form.chkall.checked;
}
}
함수 chkuserlogin() {
반환 false;
}
else {
true를 반환;
}
}
기능 chkcookieed() {
if (getcookie("username") !== "") {
var url = "/ajax.asp?action =로그인메뉴";
url = "&random=" Math.random();
ajaxPost(url,null,null,"top_login"," ");
}
}
function userlogout() {
var url = "/AspCode.asp?getType=logout";
url = "&random=" Math.random();
ajaxPost(url,null,null,"top_login","정재退출...");
chkcookieed();
alert('欢迎再次光临阿里西西WEB开发社区...');
}
//Cookie解密
함수 DecodeCookie(str)
{
var strArr;
var strRtn="";
strArr=str.split("a");
시도해 보세요{
for (var i=strArr.length-1;i>=0;i--)
strRtn =String.fromCharCode(eval(strArr[i]));
}catch(e){
}
return strRtn;
}
function isnumber(str){
var digits="1234567890";
var i=0;
var strlen=str.length;
while((i
if(digits.indexOf(char)==-1)return false;i ;
}
true를 반환합니다.
}
//检查비법자符
//str 要检查的字符
//badwords 비법문자符 &|=
함수 checkbadwords(str, badwords) {
if (typeof (str) != "string" || typeof(나쁜 단어) != "string") {
return(false);
}
for (i=0; i
for (j=0; j
return false;
휴식;
}
}
}
true를 반환합니다.
}
function switchTag(tag,bar)
{
for(i=1; i {
if ("tag" i= =tag)
{
document.getElementById(tag).getElementsByTagName("a")[0].className="selectli" i;
document.getElementById(tag).getElementsByTagName("a")[0].getElementsByTagName("span")[0].className="selectspan" i;
}else{
document.getElementById("tag" i).getElementsByTagName("a")[0].className="";
document.getElementById("tag" i).getElementsByTagName("a")[0].getElementsByTagName("span")[0].className="";
}
if ("bar" i==bar)
{
document.getElementById(bar).className="";
}else{
document.getElementById("bar" i).className="hidebar";
}
document.getElementById("bar").className=bar;
}
}
function switchNew(fornum,showname,lname,newid)
{
for(i=1; i {
if ( lname i==newid)
{
document.getElementById(newid).className=showname;
}else{
document.getElementById(lname i).className="hidebar";
}
}
}
기능 bgc(cssid) {
스위치(cssid) {
케이스 0 : this.style.Background='#FFFF FF';
휴식;
사례 1 : this.style.Background='#E8F5FE';
휴식;
케이스 2 : this.style.Background='#FFFFDD';
휴식;
사례 3 : this.style.Background='#F2FDDB';
휴식;
사례 4 : this.style.Background='#FFE7F4';
휴식;
사례 5 : this.style.Background='#F7F7F7';
휴식;
기본값 : this.style.Background='#FFFFFF';
}
}
함수 imgzoom(o){
if(event.ctrlKey) {
var zoom = parseInt(o.style.zoom, 10) || 100;
확대/축소 -= event.wheelDelta / 12;
if(zoom > 0) {
o.style.zoom = 줌 '%';
}
false를 반환합니다.
} else {
true를 반환합니다.
}
}
함수 CheckAll(form)
{
for (var i=0;i
var e = form.elements[i];
if (e.Name != "chkAll"&&e.disabled!=true)
e.checked = form.chkAll.checked;
}
}
함수 addfav(favtitle,favform,favid)
{
location.href = "http://www.alixixi.com/account/user_Favorites.asp ?url=" document.URL "&favtitle=" favtitle "&from=" favform "&id=" favid;
}
기능 mto(aid) {
location.href = "http://www.alixixi.com/account/user_post.asp?aid=" aid;
}
function apost(url){
createxmlhttp();
//getMode
url = "&random=" Math.random();
xmlhttp.open("get",url,true);
xmlhttp.setRequestHeader("CONTENT-TYPE","application/x-www-form-urlencoded");
//xmlhttp.onreadystatechange= function () { checkSeo(); } ;
xmlhttp.send(null);
}
함수 checkSeo(){
var info = 'test';
var loadnews = '정재加载';
if (xmlhttp.readyState == 4){
document.getElementById(info).innerHTML = loadnews;
if(xmlhttp.status == 200){
var retext = xmlhttp.responseText;
document.getElementById(info).innerHTML=retext;
}
}
else{
document.getElementById(info).innerHTML=loadnews;
}
}
함수 setstyle(sid) {
if (sid!=='' || sid!==null)
{
switch (parseInt(sid))
{
case 1:
setcookie('ali_style', 1, 600000);
document.all.css.href = '/css/style1.css';
휴식;
사례 2:
setcookie('ali_style', 2, 600000);
document.all.css.href = '/css/style2.css';
휴식;
사례 3:
setcookie('ali_style', 3, 600000);
document.all.css.href = '/css/style3.css';
휴식;
}
}
}
함수 ResumeError() {
true를 반환;
}
window.onerror = ResumeError;
setstyle(getcookie('ali_style'));
//window.onload = setstyle(getcookie('ali_style'));