$(document).ready(function(){$("#hxxiang11").hide();$("#hxxiang12").hide();$("#hxxiang13").hide();$("#hxxiang14").hide();$("#hxxiang15").hide();$("#hxxiang16").hide();$("#hxxiang17").hide();$("#hxxiang18").hide();$("#hxxiang19").hide();$("#hxxiang20").hide();});$("#initvoteform").submit(function(){if($("#vtitle",this).val().length<=0){alert("投票主题不能为空！");$("#vtitle",this).focus();return false;}if($("#vtitle",this).val().length<5){alert("投票主题太简单了!");$("#vtitle",this).focus();return false;}if($("#vtitle",this).val().length>30){alert("投票主题已超出指定长度,30字已內");$("#vtitle",this).focus();return false;}if($("#vdetails").val().length<=0){alert("投票说明不能为空!");$("#vdetails",this).focus();return false;}if($("#vdetails").val().length>700){alert("投票说明已超出指定长度,700字已內");$("#vdetails",this).focus();return false;}if($("#answer1",this).val().length<=0){alert("至少填写1~2个候选项!");$("#answer1",this).focus();return false;}if($("#answer2",this).val().length<=0){alert("至少填写1~2个候选项!");$("#answer2",this).focus();return false;}if($("#answer1",this).val().length>200){alert("侯选项已超出指定长度,200字已內");$("#answer1",this).focus();return false;}if($("#answer2",this).val().length>200){alert("侯选项已超出指定长度,200字已內");$("#answer2",this).focus();return false;}if($("#answer3",this).val().length>200){alert("侯选项已超出指定长度,200字已內");$("#answer3",this).focus();return false;}if($("#answer4",this).val().length>200){alert("侯选项已超出指定长度,200字已內");$("#answer4",this).focus();return false;}if($("#answer5",this).val().length>200){alert("侯选项已超出指定长度,200字已內");$("#answer5",this).focus();return false;}if($("#answer6",this).val().length>200){alert("侯选项已超出指定长度,200字已內");$("#answer6",this).focus();return false;}if($("#answer7",this).val().length>200){alert("侯选项已超出指定长度,200字已內");$("#answer7",this).focus();return false;}if($("#answer8",this).val().length>200){alert("侯选项已超出指定长度,200字已內");$("#answer8",this).focus();return false;}if($("#answer9",this).val().length>200){alert("侯选项已超出指定长度,200字已內");$("#answer9",this).focus();return false;}if($("#answer10",this).val().length>200){alert("侯选项已超出指定长度,200字已內");$("#answer10",this).focus();return false;}if($("#answer11",this).val().length>200){alert("侯选项已超出指定长度,200字已內");$("#answer11",this).focus();return false;}if($("#answer12",this).val().length>200){alert("侯选项已超出指定长度,200字已內");$("#answer12",this).focus();return false;}if($("#answer13",this).val().length>200){alert("侯选项已超出指定长度,200字已內");$("#answer13",this).focus();return false;}if($("#answer14",this).val().length>200){alert("侯选项已超出指定长度,200字已內");$("#answer14",this).focus();return false;}if($("#answer15",this).val().length>200){alert("侯选项已超出指定长度,200字已內");$("#answer15",this).focus();return false;}if($("#answer16",this).val().length>200){alert("侯选项已超出指定长度,200字已內");$("#answer16",this).focus();return false;}if($("#answer17",this).val().length>200){alert("侯选项已超出指定长度,200字已內");$("#answer17",this).focus();return false;}if($("#answer18",this).val().length>200){alert("侯选项已超出指定长度,200字已內");$("#answer18",this).focus();return false;}if($("#answer19",this).val().length>200){alert("侯选项已超出指定长度,200字已內");$("#answer19",this).focus();return false;}if($("#answer20",this).val().length>200){alert("侯选项已超出指定长度,200字已內");$("#answer20",this).focus();return false;}return true;});
