日期:2014-05-17 浏览次数:20966 次
<%
Dim getSelectedIndex
Dim getSNO, getSCLASS, getSNAME, getCNO, getGRADE
'//从“iStuDisplay.asp”获取:学号、班级、课程号、成绩
getSelectedIndex = Request("selectedIndex")
getSNO = Request("txtSNO" &getSelectedIndex)
getSNAME = Request("txtSName" &getSelectedIndex)
getSCLASS = Request("txtSCLASS" &getSelectedIndex)
getCNO = Request("txtCNO" &getSelectedIndex)
getGRADE = Request("txtGRADE" &getSelectedIndex)
%>
<!--打印从“iStuDisplay.asp”获取的“学号、班级、课程号、成绩”信息-->
<b><font size = "2" color = "Maroon">您所需要修改的记录如下:</font></b><br>
<table width="40%" border="1" bordercolor="DarkSlateGray" cellspacing="1" cellpadding="3">
<tr bgcolor=DarkBlue >
<th><font size='2' color="White">学号</font></th>
<th><font size='2' color="White">姓名</font></th>
<th><font size='2' color="White">班级</font></th>
<th><font size='2' color="White">课程号</font></th>
<th><font size='2' color="White">成绩</font></th>
</tr>
<%
Response.Write("<tr bgcolor = white>")
Response.Write("<td><font size='2'>"&getSNO&"</font></td>")
Response.Write("<td><font size='2'>"&getSCLASS&"</font></td>")
Response.Write("<td><font size='2'>"&getSNAME&"</font></td>")
Response.Write("<td><font size='2'>"&getCNO&"</font></td>")
Response.Write("<td><font size='2'>"&getGRADE&"</font></td>")
Response.Write("</tr>")
%>
</table>
<html>
<body>
<body style="background-color:DarkSeaGreen;">
<form name = "updateForm">
<font size = "2">修改为:<input type = "text" name = "txtUpdateScore" size ="4" maxlength = "3"> 分 <input type = "Button" name = "btnUpdateScore" value = "点击修改" onclick = "btnUpdateScoreCheck()">
</form></font>
<script language = "Javascript">
function btnUpdateScoreCheck()
{
if (window.confirm("是否确定修改?") == true )
{
//如果选择“是”则执行修改操作
document.updateForm.action = "iStuUpdating.asp";
document.updateForm.target = "_self";
document.updateForm.method = "post";
document.updateForm.submit();
//执行以后这段代码就不见了,报错了!
<%
'//从“iStuUpdating.asp”(即本页面)获取输入的需要修改的分数值
Dim getTxtUpdateScore
getTxtUpdateScore = Request("txtUpdateScore")