设为首页收藏本站

新微赢技术网

 找回密码
 注册
搜索
热搜: 回贴
查看: 95|回复: 3
打印 上一主题 下一主题

版主再看看代码.还是没有对,关于列表移动.后多值写入数据库

[复制链接]
跳转到指定楼层
1#
发表于 2010-1-8 06:10:15 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
<!--#include file="conn.asp"-->
<%dim did,dname
did=request.querystring("downid")
dname=request.querystring("proname")
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<style type="text/css">
<!--
.box{ margin:10px auto auto 10px;border:solid 1px #006699;width:98%;}
.topbg{margin:1px 1px auto 1px; background:#006699;height:30px;width:auto;}
.config{margin:5px 5px auto 5px;width:auto;}
.input{border:solid 1px #d2d2d2;width:200px;height:25px;}
.button{border:solid 1px #d2d2d2;width:30px;height:25px;}
.input1{border:solid 1px #d2d2d2;width:500px;height:25px;}
.pictable{height:30px;width:600px;}
.font{color:#ffffff;font-size:"18px";text-align:center;}
.title{font-color:"#000000"; font-size:16px; font-family:宋体,Arial, Helvetica, sans-serif;background:#f1fafa;}
.table{background:#006699;}
.contents{font-color:"#000000"; font-size:12px; font-family:宋体,Arial, Helvetica, sans-serif;}
a{ text-decoration: none; color:#006699;}
a:hover{
display:block;
width:auto;
height:auto;
background-color: #d2d2d2;
}
-->
</style>
</head>
<script type="text/javascript">
<!--
function Mv(a,b){
var i=0;
var f=document.getElementById(a);
var t=document.getElementById(b);
for (var i=0; i<f.options.length;i++){
if(f.options[i].selected){
var no=new Option();
no.value=f.options[i].value;
no.text=f.options[i].text;
t.options[t.options.length]=no;}
}
Rv(a);
}
function Rv(o){
var o=document.getElementById(o);
for(var i=o.options.length-1;i>=0;i--){
if (o.options[i].selected && o.options[i] !=""){
o.options[i].value="";
o.options[i].text="";
o.options[i]=null;
}
}
}
function Page_Submit()
{
var sel=document.myform.sel2;
for(var i=0;i<sel.options.length;i++)
{
document.myform.sel3.value+=sel2.options[i].value+"|";
}
}
-->
</script>
<body>
<div class="box">
<div class="topbg">
<div class="font">增加下载</div>
</div>
<div class="config">
<%dim rs1
set rs1=server.createobject("adodb.recordset")
rs1.open "select * from download where downid="&did,dbconn,1,1%>
<form name="myform" method="post" action="downloadsave.asp?action=newdown" >
<table width="99%" border="0" cellpadding="1" cellspacing="1" class="table">
<tr class="title">
<td class="contents">Product Name</td>
<td><input name="proname" type="text" class="input" value="<%=rs1("proname")%>"/></td>
<td>Downtype</td>
<td><select class="input" name="downtypeid">
<%dim rs2
set rs2=server.createobject("adodb.recordset")
rs2.open"select * from download_class order by downtypeid ASC",dbconn,1,1
do while not rs2.eof%>
<option selected value="<%=rs2("downtypeid")%>"><%=rs2("downtypename")%></option>
<%rs2.movenext
loop
rs2.close
set rs2=nothing%>
</select></td>
</tr>
<tr bgcolor="#f1fafa">
<td class="contents" >File Version </td>
<td ><input name="fversion" type="text" class="input" /></td>
<td >Filesize</td>
<td ><input name="fsize" type="text" class="input" /></td>
</tr>

<tr bgcolor="#f1fafa">
<td class="contents">Operation System </td>
<td colspan="3" ><table border="0" cellpadding="0" cellspacing="0"><tr><td><select name="sel1" size="8" multiple="true">
<option value="DOS">DOS</option>
<option value="Windows95/98">Windows95/98</option>
<option value="Windows2000">Windows2000</option>
<option value="Windows XP">Windows XP</option>
<option value="Windows XP 64Bit">Windows XP 64Bit</option>
<option value="Windows Server2003 32Bit">Windows Server2003 32Bit</option>
<option value="Windows Server2003 64Bit">Windows Server2003 64Bit</option>
<option value="Windows Vista x86 32Bit">Windows Vista x86 32Bit</option>
<option value="Windows Vista x64 64Bit">Windows Vista x64 64Bit</option>
<option value="Linux">Linux</option>
</select></td><td>
<input name=" " type="button" class="button" onClick="Mv('sel1','sel2');" value="→" />
<br/>
<input name=" " type="button" class="button" onClick="Mv('sel2','sel1');" value="←" /></td>
<td>
<select name="sel2" size="8" multiple="true">
</select> </td></tr></table></td>
</tr>
<tr bgcolor="#f1fafa">
<td class="contents">Global</td>
<td colspan="3" ><input name="global1" type="text" class="input1"/></td>
</tr>
<tr bgcolor="#f1fafa">
<td class="contents">USA1</td>
<td colspan="3" ><input name="usa1" type="text" class="input1" /></td>
</tr>
<tr bgcolor="#f1fafa">
<td class="contents">USA2</td>
<td colspan="3" ><input name="usa2" type="text" class="input1" /></td>
</tr>
<tr bgcolor="#f1fafa">
<td class="contents">Europe</td>
<td colspan="3" ><input name="europe1" type="text" class="input1" /></td>
</tr>
<tr bgcolor="#f1fafa">
<td class="contents">China</td>
<td colspan="3" ><input name="china1" type="text" class="input1" /></td>
</tr>
<tr bgcolor="#f1fafa">
<td class="contents">TW</td>
<td colspan="3" ><input name="tw" type="text" class="input1" /></td>
</tr>
<tr bgcolor="#f1fafa">
<td class="contents">Other1</td>
<td colspan="3" ><input name="other1" type="text" class="input1" /></td>
</tr>
<tr bgcolor="#f1fafa">
<td class="contents">Other2</td>
<td colspan="3" ><input name="other2" type="text" class="input1" /></td>
</tr>
<tr bgcolor="#f1fafa">
<td class="contents">Description</td>
<td colspan="3" ><textarea name="description1" style="display:none;"></textarea>
<iframe id="description1" src="jweditor/ewebeditor.asp?id=description1&style=mimi" frameborder="0" scrolling="no" width="600px" height="200px"></iframe></td>
</tr>

<tr class="contents" bgcolor="#f1fafa">
<td></td>
<td colspan="3" ><input name="Submit" type="button" onClick="Page_Submit();" class="button" value="确定" />
<input name="Submit2" type="reset" class="button" value="重写" /></td>
</tr>
</table>
<input type="hidden" name="sel3" >
</form>
<%rs2.close
set rs2=nothing%>
</div>
</div>
</body>
</html>
报的sel2未定义.
帮忙看看..
把列表2的数据写入数据库,
2#
发表于 2010-1-8 06:10:18 | 只看该作者
function Page_Submit()
{
var sel=document.myform.sel2;
for(var i=0;i<sel.options.length;i++)
{
document.myform.sel3.value+=sel.options[i].value+"|";
}
}
这个函数写错了再试试看。
回复 支持 反对

使用道具 举报

3#
发表于 2010-2-4 12:05:07 | 只看该作者
注:我是来收集资料滴...
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

申请友链|小黑屋|最新主题|手机版|新微赢技术网 ( 苏ICP备08020429号 )  

GMT+8, 2024-11-18 06:48 , Processed in 0.105008 second(s), 9 queries , Gzip On, Memcache On.

Powered by xuexi

© 2001-2013 HaiAn.Com.Cn Inc. 寰耽

快速回复 返回顶部 返回列表