Home  >  Article  >  Web Front-end  >  Date control implemented in JavaScript

Date control implemented in JavaScript

高洛峰
高洛峰Original
2016-11-26 11:32:581531browse

Date control implemented in JavaScript
It also reads the current time

[html]
 
 
 
 
日期自动输入控件 
 
 
 
 
 
 
 
 
 
 

 
 
   
    
    
      
      
      
    
    
    
       
       
   
生日: 
           *         
    
 
     
  
 
 
 


html页面中的js执行顺序:
1) 在head标签内的最先执行
2) 在body标签内的 执行
3) 当在 body标签中 加了 onload  事件时 对应的 js 最后执行,也就是当页面加载完在执行

注意:当在 body标签中 加了 onload  事件时 在head标签内,所引用外部的 js 不起作用,当换成 在body 内部或之上引用外部js时可正常引用


Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn