// 这段是调用了文件的JAVASCRIPT标签
<script language="javascript" src="Function/JScript.js" type="text/javascript"></script>
// 这段是该页面所用到的JAVASCRIPT标签
<script language="javascript" type="text/javascript">
function CheckValues()
{
if(0 >= document.getElementById("txtCaption").value.length)
{
alert('请输入标题!');
return false;
}
if(0 >= document.getElementById("txtTimeOut").value.length)
{
alert('请输入时长!');
return false;
}
var temp = document.getElementById("txtTimeout").value;
if(isNaN(++temp))
{
alert('请输入正确时长!');
return false;
}
if(0 >= document.getElementById("txtToDate").value.length)
{
alert('请输入有效日期!');
return false;
}
if(0 >= document.getElementById("txtInformation").value.length)
{
alert('请输入公告内容!');
return false;
}
if(2000 < document.getElementById("txtInformation").value.length)
{
alert('公告内容不能超过2000个字符!');
return false;
}
return true;
}
</script>
<script language="javascript" src="Function/JScript.js" type="text/javascript"></script>
// 这段是该页面所用到的JAVASCRIPT标签
<script language="javascript" type="text/javascript">
function CheckValues()
{
if(0 >= document.getElementById("txtCaption").value.length)
{
alert('请输入标题!');
return false;
}
if(0 >= document.getElementById("txtTimeOut").value.length)
{
alert('请输入时长!');
return false;
}
var temp = document.getElementById("txtTimeout").value;
if(isNaN(++temp))
{
alert('请输入正确时长!');
return false;
}
if(0 >= document.getElementById("txtToDate").value.length)
{
alert('请输入有效日期!');
return false;
}
if(0 >= document.getElementById("txtInformation").value.length)
{
alert('请输入公告内容!');
return false;
}
if(2000 < document.getElementById("txtInformation").value.length)
{
alert('公告内容不能超过2000个字符!');
return false;
}
return true;
}
</script>
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货