收集整理些有用的JAVASCRIPT小知识
时间:2007-12-27 来源:不详 作者:林子
copyright dedecms
以下是引用片段:<%@LANGUAGE="VBSCRIPT"CODEPAGE="936"%>
<!--#includefile="../conn.asp"-->
<!DOCTYPEHTMLPUBLIC"-//W3C//DTDHTML4.01Transitional//EN">
<html>
<head>
<metahttp-equiv="Content-Type"content="text/html;charset=gb2312">
<title>UntitledDocument</title>
<STYLEtype=text/css>TD{
FONT-SIZE:12px
}
SELECT{
FONT-SIZE:12px
}
INPUT{
FONT-SIZE:12px
}
A{
TEXT-DECORATION:none
}
A:hover{
COLOR:#c90000;TEXT-DECORATION:none
}
</STYLE>
<SCRIPTLANGUAGE="JavaScript">
<!--
//window.onload=initPage;
//functioninitPage()
//{
//btnPutUp.onclick=putUp;
//btnPutDown.onclick=putDown;
//btnGoUp.onclick=goUp;
//btnGoDown.onclick=goDown;
//}
functionputUp()
{
varstrTempValue;
varstrTempText;
varintCurIndex;
intCurIndex=document.paixu.sltFruit.selectedIndex; 织梦内容管理系统
//alert("intCurIndex:" intCurIndex);
if(intCurIndex>0)
{
strTempValue=document.paixu.sltFruit.options.item(intCurIndex).value;
strTempText=document.paixu.sltFruit.options.item(intCurIndex).text;
strTemp=document.paixu.sltFruit.options.item(intCurIndex-1).value
//alert(strTempText "-" strTempValue);
document.paixu.sltFruit.options.item(intCurIndex).value=document.paixu.sltFruit.options.item(intCurIndex-1).value;
document.paixu.sltFruit.options.item(intCurIndex).text=document.paixu.sltFruit.options.item(intCurIndex-1).text;
document.paixu.sltFruit.options.item(intCurIndex-1).value=strTempValue;
document.paixu.sltFruit.options.item(intCurIndex-1).text=strTempText;
document.paixu.sltFruit.selectedIndex=intCurIndex-1;
intCur=intCurIndex-1
//shang=eval("document.paixu." "slt" intCurIndex ".value")-1;
eval("document.paixu." "slt" intCurIndex ".value=strTemp")
//xia=eval("document.paixu." "slt" intCur ".value")-(-1);
eval("document.paixu." "slt" intCur ".value=strTempValue") 织梦内容管理系统
//alert(ss);
//document.paixu.slt" intCurIndex ".value=eval("document.paixu." "slt" intCurIndex ".value")-1;
//document.paixu."slt" intCurIndex ".value"=document.paixu.("slt" intCurIndex).value-1;
}
}
functionputDown()
{
varstrTempValue;
varstrTempText;
varintCurIndex;
varintIndexCount;
intCurIndex=document.paixu.sltFruit.selectedIndex;
intIndexCount=document.paixu.sltFruit.length;
//alert("intCurIndex:" intCurIndex);
//alert("intIndexCount:" intIndexCount);
文章评论
共有位Admini5网友发表了评论 查看完整内容