zoukankan      html  css  js  c++  java
  • extJs学习基础4 Ext.each的用法

     1 Ext.onReady(function(){
     2             //案例一
     3             /*
     4             var countries = ['Vietnam', 'Singapore', 'United States', 'Russia'];
     5             Ext.Array.each(countries, function(name, index, countriesItSelf){
     6                 console.log(name);
     7                 if(name == 'Vietnam'){
     8                     return false;  //停止循环
     9                 }
    10             });
    11             */
    12             //案例二
    13             var StudentsJSON = {    
    14                 student:[{    
    15                     name: '张三',    
    16                     studentid: 200801,    
    17                     grade: 80    
    18                 },{    
    19                     name: '李四',    
    20                     studentid: 200802,    
    21                     grade: 90    
    22                 },{    
    23                     name: '王五',    
    24                     studentid: 200803,    
    25                     grade: 90    
    26                 },{    
    27                     name: '李二麻子',    
    28                     studentid: 200804,    
    29                     grade: 90    
    30                 }]    
    31             };  
    32 
    33             Ext.each(StudentsJSON.student, function(student, index, self){
    34                 console.log(student.name);
    35                 if(student.studentid == '200802'){
    36                     return false;
    37                 }
    38             });
    39 
    40         });
    41     </script>
  • 相关阅读:
    生成器笔记
    迭代器笔记
    hashilib_module
    Ubuntu操作及各种命令笔记
    python正则表达式2
    python正则表达式1
    python文件操作(with关键字)
    python文件操作
    python包
    python模块
  • 原文地址:https://www.cnblogs.com/shaoshao/p/4107870.html
Copyright © 2011-2022 走看看