<%@ Page Language="C#" AutoEventWireup="true" CodeFile="SetScores2.aspx.cs" Inherits="Admin_Test_SetScores2" %>

<!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 runat="server">
    <title>分配分数</title>
    <link href="../../StyleSheet.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript">
    function getTotalScoresForSubjectType(lblCountID,txtScoresID,spanTotalScoresID)
    {
       var totalScores=Number(document.getElementById(lblCountID).innerText) * Number(document.getElementById(txtScoresID).value);
       document.getElementById(spanTotalScoresID).innerText=totalScores;
       
       getTotalScores();
    }
    function getTotalScores()
    {
        var fillBlankTotalScores=Number(document.getElementById("spanJudgeTotalScores").innerText);
        var singleSelectionTotalScores=Number(document.getElementById("spanSingleSelectionTotalScores").innerText);
        var multiSelectionTotalScores=Number(document.getElementById("spanMultiSelectionTotalScores").innerText);
        
        document.getElementById("txtTotalScores").value=fillBlankTotalScores+singleSelectionTotalScores+multiSelectionTotalScores;
    }
    </script>
</head>
<body>
    <form id="form1" runat="server">
<div class="listAddLink">
            <a href="javascript:history.back();">返 回</a></div>
            <table cellpadding="0" cellspacing="0" class="form" width="800px">
                <tr>
                    <td colspan="2" class="formName" align="left">
                     <span style="margin-left:10px">分配分数</span>
                    </td>
                </tr>
                <tr>
                    <td style="width: 200px;" class="titleName">
                        判断题(共<asp:Label ID="Label1" runat="server" Text="0"></asp:Label>
                        题)</td>
                    <td class="inputArea" style="width: 598px">
                        每题：<asp:TextBox ID="TextBox1" runat="server" CssClass="txt" Width="50px" onkeyup="getTotalScoresForSubjectType('Label1', 'TextBox1', 'spanJudgeTotalScores')">0</asp:TextBox>
                        分 共<span id="spanJudgeTotalScores">0</span>分</td>
                </tr>
                
                 <tr>
                    <td style="width: 200px; " class="titleName">
                        单选题(共<asp:Label ID="Label2" runat="server" Text="0"></asp:Label>
                        题)                     </td>
                    <td class="inputArea" style="width: 598px" >
                        每题：<asp:TextBox ID="TextBox2" runat="server" CssClass="txt" Width="50px" onkeyup="getTotalScoresForSubjectType('Label2', 'TextBox2', 'spanSingleSelectionTotalScores')">0</asp:TextBox>
                        分 共<span id="spanSingleSelectionTotalScores">0</span>分</td>
                </tr>
                <tr>
                    <td class="titleName" style="width: 200px">
                                                多选题(共<asp:Label ID="Label3" runat="server" Text="0"></asp:Label>
                                                题)
                    <td class="inputArea" style="width: 598px">
                        每题：<asp:TextBox ID="TextBox3" runat="server" CssClass="txt" Width="50px" onkeyup="getTotalScoresForSubjectType('Label3', 'TextBox3', 'spanMultiSelectionTotalScores')">0</asp:TextBox>
                        分 共<span id="spanMultiSelectionTotalScores">0</span>分</td>
                </tr>
                <tr>
                    <td colspan="2"  class="submitArea">
                   <b style="color:White;">该试卷共<asp:TextBox ID="txtTotalScores" runat="server" CssClass="txt" Width="30px" Text="0"></asp:TextBox>
                        分</b> 
                         <span style="margin-right:10px"><asp:Button ID="btnSave" runat="server" 
                            Text="下一步" Width="80px" CssClass="btn" ToolTip="添加考试" onclick="btnSave_Click" /></span></td>
                </tr>
            </table>
    </form>
</body>
</html>
