<%@ Page Language="C#" AutoEventWireup="true" Codebehind="VoteManger.aspx.cs" MasterPageFile="../../MasterPage/Default.Master"
    Inherits="LJCMS.Admin.SysSetting.Vote.VoteManger" %>

<asp:Content ID="Content1" ContentPlaceHolderID="PageBody" runat="server">


    <table style="width:100%">
        <tr>
            <td>
                <DataLayerWebControls:HeadMenuWebControls ID="HeadMenuWebControls1" runat="server"
                    HeadTitleTxt="">
                    <DataLayerWebControls:HeadMenuButtonItem ButtonPopedom="List" ButtonUrl="VoteList.aspx"
                        ButtonUrlType="Href" ButtonVisible="True" ButtonName="调查" />
                </DataLayerWebControls:HeadMenuWebControls>
                <DataLayerWebControls:TabOptionWebControls ID="TabOptionWebControls1" runat="server">
                    <DataLayerWebControls:TabOptionItem ID="TabOptionItem1" runat="server" Tab_Name="基本信息">
                        <table width="100%" border="0" cellspacing="1" cellpadding="3" align="center">
                            <tr>
                                <td class="table_body">
                                    调查标题</td>
                                <td class="table_none">
                                    <asp:TextBox ID="VoteTitle_Input" runat="server" CssClass="text_input" Width="300px"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td class="table_body">
                                    投票类型（1/0）</td>
                                <td class="table_none">
                                    <asp:RadioButton ID="VoteType_1" runat="server" Text="单选" GroupName="VoteType" Checked="true" />
                                    <asp:RadioButton ID="VoteType_2" runat="server" Text="双选" GroupName="VoteType" />
                                </td>
                            </tr>
                            <tr>
                                <td class="table_body">
                                    语言(1/0)</td>
                                <td class="table_none">
                                    <asp:RadioButton ID="VLanguage1" runat="server" Text="中文" GroupName="VLanguage" Checked="true" />
                                    <asp:RadioButton ID="VLanguage2" runat="server" Text="英文" GroupName="VLanguage" />
                                </td>
                            </tr>
                            <tr>
                                <td class="table_body">
                                    是/否为当前</td>
                                <td class="table_none">
                                    <asp:CheckBox ID="VState1" runat="server" Text="默认" Checked="true" />
                                </td>
                            </tr>
                            <tr>
                                <td class="table_body">
                                    自定义子项目
                                </td>
                                <td class="table_none">
                                    <asp:TextBox ID="Num" Text="0" size="5" CssClass="text_input" runat="server" /><input
                                        name="SetTB" class="cbutton" id="SetTB" value="设置" onclick="num_1()" type="button" />
                                    <input name="addTB" id="addTB" class="cbutton" type="Button" onclick="num_1_1()"
                                        value="增加一个" />
                                    <br />
                                    <span id="Num_Str" name="NumStr">
                                        <asp:Literal ID="aspLit" runat="server"></asp:Literal>
                                    </span>
                                </td>
                            </tr>
                        </table>
                    </DataLayerWebControls:TabOptionItem>
                </DataLayerWebControls:TabOptionWebControls>
                <table width="100%" border="0" cellspacing="1" cellpadding="3" align="center" id="PostButton"
                    runat="server">
                    <tr>
                        <td align="right">
                            <asp:Button ID="Button1" runat="server" CssClass="button_bak" Text="确定" OnClick="Button1_Click" />
                            <input id="Reset1" class="button_bak" type="reset" value="重填" />
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>

    <script type="text/javascript">


function num_1_1()
{
	var num_1=document.all.<%= this.Num.ClientID %>.value;
	var num_str=document.getElementById("Num_Str");
	var str="";
	str+="子项目标题：<input id='VoteChild"+(parseInt(num_1)+1)+"' type='text' name='VoteChild"+(parseInt(num_1)+1)+"'  />";
	str+="投票数量：<input id='VoteCount"+(parseInt(num_1)+1)+"' type='text' name='VoteCount"+(parseInt(num_1)+1)+"' value='0'/><br/>";
	num_str.innerHTML=num_str.innerHTML+str;
	document.all.<%= this.Num.ClientID %>.value=(parseInt(num_1)+1);
}
function num_1()
{
    var num_1=document.all.<%= this.Num.ClientID %>.value;
	var num_str=document.getElementById("Num_Str");
	var str="";
	for(var i=0;i<num_1;i++)
	{
	str+="子项目标题：<input id='VoteChild"+(parseInt(i)+1)+"' type='text' name='VoteChild"+(parseInt(i)+1)+"' />";
	str+="投票：<input id='VoteCount"+(parseInt(i)+1)+"' type='text' name='VoteCount"+(parseInt(i)+1)+"' value='0'/><br/>";
	}
	num_str.innerHTML=str;
	
}   
    </script>

</asp:Content>
