JS识记

1.重新按照URL地址加载本页?

  window.location.reload();

2.JS中实现命名空间一例?

<script type="text/javascript">
this["Akmii"] = Object.create(Object.prototype);
this["Akmii"].test = function(){ alert("Akmii.test"); }
Akmii.test(); this["Akmii"]["Workflow"] = new Object();
this["Akmii"]["Workflow"].test = function(){ alert("Akmii.Workflow.test"); }
Akmii.Workflow.test();
</script>

3.Jquery获取Select中option个数?

var length = $('#mySelectList').children('option').length;

或者

var length = $('#mySelectList > option').length;
上一篇:Spring常用表单验证注解


下一篇:Spring进行表单验证