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;

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-07-31
  • 2021-09-29
  • 2021-09-11
  • 2021-11-07
  • 2021-12-23
  • 2021-08-16
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-10-03
  • 2021-08-04
  • 2021-06-22
  • 2022-12-23
  • 2021-07-09
相关资源
相似解决方案