知道的帮帮忙
解决方案 »
- Struts2使用convention或codebehind零配置,action还可以用spring管理吗
- Struts2 验证的错误信息返回到action的问题
- 在项目中调用存储过程出现的问题
- 两个表的两个相同字段,当修改其中一个的时候,另一个表中的字段也被修改
- 急等高人解决SAX解析XML问题,没有分,请大家帮帮忙
- 我下载了一个源代码,加载后运行后出现这样的错误,什么原因啊?跟ant和xdoclet有关系
- 如何插入数据后返回ID
- struts中<action>元素path问题
- 经典分析:数据传输,解决对大家在都有帮助
- 求救:页面中的表单和servlet交互,用getParameter()得到的文本框的值为什么总为空?
- javabean的问题: Cannot find any information on property
- 开始弄 JasperReport 报表了,想求个例子!
<body>
<input type="text" id="1" />
<input type="button" value="validator" id="2" onclick="validator();" />
</body>
</html>
<script>
function validator()
{
var var1 = document.getElementById("1") ;
alert(var1);
var parten = /^\s*$/ ;
if(parten.test(var1))
alert("all spaces!") ;
else
alert("not all spaces");
}
</script>
<body>
<input type="text" id="1" />
<input type="button" value="validator" id="2" onclick="validator();" />
</body>
</html>
<script>
function validator()
{
var var1 = document.getElementById("1") ;
alert(var1);
//这是正则,\s匹配空格和回车等
var parten = /^\s*$/ ;
//执行验证
if(parten.test(var1))
alert("all spaces!") ;
else
alert("not all spaces");
}
</script>