收集整理些有用的JAVASCRIPT小知识
时间:2007-12-27 来源:不详 作者:林子
if(intCurIndex<intIndexCount-1)
{
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")
织梦好,好织梦
}
}
functiongoUp()
{
varintCurIndex;
intCurIndex=sltCountry.selectedIndex;
if(intCurIndex>0)
sltCountry.selectedIndex=intCurIndex-1;
}
functiongoDown()
{
varintCurIndex;
varintIndexCount;
intCurIndex=sltCountry.selectedIndex;
intIndexCount=sltCountry.length;
if(intCurIndex<intIndexCount-1)
sltCountry.selectedIndex=intCurIndex 1;
}
//-->
</SCRIPT>
<body>
<%'存储数据库的过程
n=trim(request("num"))
ifn<>""then
i=1
y=0
dowhilenotn<0
conn.execute("updateBigClass_Newsetpaixu="&i&"whereBigClassID="&trim(request(("slt")&y))&"")
'我用的办法是在数据库表里加个字段定义排序,然后显示时就靠它了
'trim(request(("slt")&y))是动态获取input的值,做循环的的时候
'都这么用
n=n-1
i=i 1
y=y 1
loop
response.Write("<SCRIPT>alert('修改成功');location='News_ClassManage.asp';</SCRIPT>")
'response.End()
else
%>
内容来自dedecms
<divalign="center">
<tableclass="border"border="0"cellspacing="2"width="620"cellpadding="0"style="word-break:break-all">
<%
Setrs=Server.CreateObject("ADODB.Recordset")
sql="select*fromBigClass_Neworderbypaixu"
rs.opensql,conn,1,1
ifnotrs.eofthen
'我的数据库表名叫BigClass_New%>
<formname="paixu"method="post"action="News_ClassPaixu.asp">
<trbgcolor="#A4B6D7"class="title">
<tdwidth="50%"height="55"align="right">
<divalign="right">
<SELECTNAME="sltFruit"size="<%=rs.recordcount%>">
<%dowhilenotrs.eof%>
<OPTIONVALUE="<%=trim(rs("BigClassID"))%>"><%=trim(rs("BigClassName"))%></OPTION>
<%rs.movenext
loop%>
</SELECT>
</div>
</td>
<tdwidth="40"height="25"align="center">
<INPUTTYPE="BUTTON"ID="btnPutUp"VALUE="上移"onClick="javascript:returnputUp();">
<INPUTTYPE="BUTTON"ID="btnPutDown"VALUE="下移"onClick="javascript:returnputDown();">
文章评论
共有位Admini5网友发表了评论 查看完整内容