zoukankan      html  css  js  c++  java
  • return

     1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
     2     <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
     3     <head>
     4         <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
     5         <title>return</title>        
     6         <script type="text/javascript">
     7             window.onload=num;    
     8             console.log(num(1));   //1
     9             console.log(num(2));   //2
    10             console.log(num(3));   //null
    11 
    12             function num(node){
    13                 if(node==1){ return 1;};
    14                 if(node==2){ return 2;};
    15                 return null;
    16             }
    17         </script>
    18     </head>
    19     <body>        
    20     </body>
    21     </html>    
     1 <script type="text/javascript">
     2     window.onload=num;
     3     running=true;    
     4     console.log(num(1));   //false;
     5     console.log(num(2));   //true alert(22);
     6     console.log(num(3));   //true alert(22);
     7 
     8     function num(node){
     9         if(node==1){ return false;};
    10         alert(22);
    11         return true;
    12     }
    13 </script>
  • 相关阅读:
    Log4j2 配置
    Spring + SpringMVC配置
    Tomcat 动态数据库连接池
    MySQL数据库备份命令
    一条insert语句插入数据库
    tomcat 性能优化
    linux RPM manager
    mysql 多主
    ceph学习
    python常用程序算法
  • 原文地址:https://www.cnblogs.com/positive/p/3441443.html
Copyright © 2011-2022 走看看