当前位置: 代码迷 >> Java Web开发 >> js 服务器停失效
  详细解决方案

js 服务器停失效

热度:824   发布时间:2016-04-17 00:13:13.0
js 服务器下失效
<script language="javascript">
function validate(myform){
if(myform.name.value.length==0){
alert("请输入用户名!");
myform.name.focus();
return false;
}
if(myform.email.value.length==0){
alert("留下你的邮箱!");
myform.email.focus();
return false;
}
if(myform.content.value.length==0){
alert("说点什么吧!");
myform.content.focus();
return false;
}
return true;
}
</script>

这段简单的验证代码在本地运行无误,但放到tomcat下就失效了,没有弹出框提示,这是为什么?
------解决方案--------------------
出现这种情况原因很多,可能因为缓存啊,==
建议你先查看下网页源文件,是否和你本地的是否一致。

另外要注意清理一下ie的缓存。
  相关解决方案