日期:2014-05-17 浏览次数:20487 次
我前台基本上判断好了,, 前台代码 <script language="javascript" type="text/javascript"> var len; var sum; var maxnum = 100000;//最大投注金额 var issue ='8878' var ishave ='1' function chCI(idval) { if(issue=='3131') { if (document.getElementById("CI"+idval).checked == true) { document.getElementById(idval).value = 1; } else { document.getElementById(idval).value = 0; } } else { if (document.getElementById("CI"+idval).checked == true) { document.getElementById(idval).value = 10; } else { document.getElementById(idval).value = 0; } } fo(idval); } function fo(idval) { var regex=/^[1-9]\d{0,}$/; var val; len = document.getElementsByName("SMONEY").length; sum = 0; for (i=0;i<parseInt(len);i++) { val = document.getElementsByName("SMONEY")[i].value; if(regex.test(val)&&(document.getElementsByName("CI")[i].disabled==false)) { document.getElementsByName("CI")[i].checked = true; sum = parseInt(sum)+parseInt(val); } else if (document.getElementsByName("CI")[i].disabled==false) { document.getElementsByName("CI")[i].checked = false; document.getElementsByName("SMONEY")[i].value = ""; } } if (parseInt(sum)>parseInt()) { document.getElementById(idval).value = ""; fo(idval); alert("您的经验不足!"); } if(sum>maxnum) { alert("对不起,总投注金额不能超过投注上限!"); return false; } document.getElementById("SMONEYSUM").value = sum; } </script> <asp:Repeater ID="rpt310GuessAdd" runat="server" onitemdatabound="rpt310GuessAdd_ItemDataBound" > <HeaderTemplate> <table class="sanyaolingtables sanyaolingTable" style=" border-collapse:collapse;font-weight:bold; "><tr> <td class="syl_add_tdOne">预测结果</td> <td class="syl_add_tdTwo">结果解释</td> <td class="syl_add_tdThree">当前赔率</td> <td class="syl_add_tdThree">请选择</td> <td class="syl_add_tdOne">竞猜</td> </tr></table> </HeaderTemplate> <ItemTemplate> <table class="sanyaolingTable" style=" border-collapse:collapse; color:#515151; "><tr> <td class="syl_add_tdOne"> <asp:Label ID="lblresult" runat="server" Text='<%#Eval("Guess_310_Child_Result") %>'></asp:Label></td> <td class="syl_add_tdTwo"> <asp:Label ID="lblE