修改表中记录时参数无法传递
当点击 修改/ 查看 功能时 ,并没有出现跳转与参数的传递 (document.URL="article_manage.asp?action=EditArticle&ID=" + e_id; )?function EditArticle(frm)
{
var e_id=0;
var e_num=0;
for(var i=0; i<frm.elements.length; i++)
if(frm.elements[i].name=="ID" && frm.elements[i].checked)
{
e_id = frm.elements[i].value;
e_num ++;
}
if(e_num!=1)
alert("请选择一篇你需要修改/查看的文章");
else
document.URL="article_manage.asp?action=EditArticle&ID=" + e_id;
}
<form action="" method="post" name="form2">
<tr >
<td colspan="9" align="left" bgcolor="#ebebeb">
<input type="submit" name="bnEdit" id="bnEdit" value="修改/查看" class="button" onClick="javascript:EditArticle(this.form)">
<input type="submit" name="bnDel" id="bnDel" value="删除" class="button">
<input type="submit" name="bnTop" id="bnTop" value="置顶" class="button">
<input type="submit" name="bndown" id="bndown" value="取消置顶" class="button">
<input type="submit" name="bnShow" id="bnShow" value="推荐" class="button">
<input type="submit" name="bnIsShow" id="bnIsShow" value="取消推荐" class="button">
<input type="submit" name="bnCopy" id="bnCopy" value="复制" class="button"></td>
</tr>
<tr>
<td align="middle" bgcolor="#ebebeb"><img src="images/formcheckbox.gif" width="20" height="20" style="cursor:hand;" onClick="javascript:ChkAll(forms[1]);" ></td>
<td align="middle" bgcolor="#ebebeb">编号</td>
<td align="middle" bgcolor="#ebebeb">标题</td>
<td align="middle" bgcolor="#ebebeb">栏目</td>
<td align="middle" bgcolor="#ebebeb">属性</td>
<td align="middle" bgcolor="#ebebeb">录入</td>
<td align="middle" bgcolor="#ebebeb">添加时间</td>
<td align="middle" bgcolor="#ebebeb"> </td>
<td align="middle" bgcolor="#ebebeb"> </td>
</tr>
<% dim action,ID
Sql = "Select * from category_manage,article_manage where category_manage.categoryID = article_manage.parentID "
Set oRs = conn.Execute(Sql)
Do While Not oRs.Eof
%>
<tr>
<td><input name="ID" type="checkbox" id="ID" value="<%=oRs("ArticleID")%>" /></td>
<td><%=oRs("ArticleID")%></td>
<td><a href="article_manage.asp?action=EditArticle&ID=<%=oRs("articleID")%>"><%=left(oRs("ArticleTitle"),10)%></a></td>
<td><%=oRs("CategoryName")%></td>
<td> </td>
<td> </td>
<td><%=oRs("AddTime")%></td>
<td> </td>
<td> </td>
</tr>
<%
oRs.MoveNext
Loop
oRs.Close
Set oRs = Nothing
%>
</form>