+ -
当前位置:首页 → 问答吧 → 请问如何批量将选中文章的zhuanti字段的值改为文本框中的值啊

请问如何批量将选中文章的zhuanti字段的值改为文本框中的值啊

时间:2011-07-16

来源:互联网

我是想先将下拉框中的值传递给文本框的,这在第一段代码是可以实现的。然后将选中的文章的zhuanti字段批量改为文本框中的数值。这在第二段代码当中无法实现。如果将第二段代码中的set rs=conn.execute("Update "&tbname&"_Article set zhuanti = "&zhuanti&" where ID In(" & ID & ")")改为set rs=conn.execute("Update "&tbname&"_Article set zhuanti = 1 where ID In(" & ID & ")")就可实现将选中的文章批量的zhuanti字段改为1.请问如何写才能批量将选中的文章改为文本框中的值啊。


C# code
<input name="zhuanti" type="text" id="zhuanti" size="4" maxlength="50">&nbsp;
                    <select name="zhuanti" onchange="document.getElementById('zhuanti').value=this.options[this.selectedIndex].id;document.getElementById('votename').value=this.options[this.selectedIndex].title; " size="1" > 
<option  id="" admin="">选择专题名称</option> 
<% 
set rsv=conn.execute("select name,id,name from zhuanti ")
do while not rsv.eof 
Response.Write " <option value='"&rsv(0)&"' id='"&rsv(1)&"' votename='"&rsv(2)&"'  > "&rsv(0)&" </option> " 
rsv.movenext
loop
rsv.close
%> 
</select>&nbsp;
    <input name="Del" type="submit" class="bnt" id="Del" value="加入专题">




C# code
ElseIf Request("Del")="解除固顶" Then
   set rs=conn.execute("Update "&tbname&"_Article set IsTop = 0 where ID In(" & ID & ")")
   
ElseIf Request("Del")="移动" Then
        If ytype="" or ytype="-1" then
            Call Alert("请选择正确的类别",-1)
        End if
   set rs=conn.execute("Update "&tbname&"_Article set ClassID = "&ytype&" where ID In(" & ID & ")")
   
   ElseIf Request("Del")="加入专题" Then
   set rs=conn.execute("Update "&tbname&"_Article set zhuanti = "&zhuanti&" where ID In(" & ID & ")")

作者: silandn   发布时间: 2011-07-16

C# code
<input name="[color=#FF0000]zhuanti[/color]" type="text" id="zhuanti" size="4" maxlength="50">&nbsp;
                    <select name="[color=#FF0000]zhuanti[/color]" onchange="


你这两个表单的名字重复了

作者: afu45   发布时间: 2011-07-16