adminvote.js

来自「前台完全分离了HTML与ASP」· JavaScript 代码 · 共 55 行

JS
55
字号
function appendVoteSection()
{
	if (document.frmVoteTheme.VoteSection.value == "")
	{
		alert("请填写投票选项后再点追加");
		document.frmVoteTheme.VoteSection.focus();
		return false;
	}
	if(document.frmVoteTheme.VoteSections.value=="")
	 document.frmVoteTheme.VoteSections.value +=document.frmVoteTheme.VoteSection.value;
	else
	 document.frmVoteTheme.VoteSections.value +="," + document.frmVoteTheme.VoteSection.value;
	document.frmVoteTheme.VoteSection.value = "";
	document.frmVoteTheme.VoteSection.focus();
}
function checkVoteForm()
{
	if(document.frmVoteTheme.VoteTheme.value=="")
	{
		alert("投票主题必须填写");
		document.frmVoteTheme.VoteTheme.focus();
		return false;
	}
	if(document.frmVoteTheme.EndTime.value=="")
	{
		alert("结束时间必须填写!");
		document.frmVoteTheme.EndTime.focus();
		return false;
	}
	if(document.frmVoteTheme.VoteSections.value=="")
	{
		alert("投票选项不能为空");
		document.frmVoteTheme.VoteSections.focus();
		return false;
	}
	return true;
}
var flag = true;
function selectAll(cButton) 
{   
	for (var i=0;i<document.VoteForm.VoteThemeDel.length;i++) {
		var temp=document.VoteForm.VoteThemeDel[i];
		temp.checked=!temp.checked;
	}
   if (flag)
   {
     cButton.src="images/Button/cancelSelect.gIF";
	 flag=false;
   }
   else
   {
     cButton.src="images/Button/selectAll.gIF";
	 flag=true;
   }
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?