Home > Web Front-end > JS Tutorial > About the implementation of JS effect function

About the implementation of JS effect function

不言
Release: 2018-07-09 17:15:17
Original
1703 people have browsed it

这篇文章主要介绍了关于关于JS效果功能的实现,有着一定的参考价值,现在分享给大家,有需要的朋友可以参考一下

平台实时监控平台,统计报错数

window.onerror = function(a,b,c,d,e){
	(new Image).src = '/m?p=${location.href}&a=${a}&b=${b}&c=${c}&d=${d}&e=${e.statck}'
}
Copy after login

Linux 打印日志输出

tail -f access.log | awk '/m/{c++; print c,$0} {}'
Copy after login

获取当前时间 YY-mm-dd HH:ii:ss

function curentTime(){ 
    var now = new Date();
    var year = now.getFullYear();
    var month = now.getMonth() + 1;
    var day = now.getDate();
    var hh = now.getHours();
    var mm = now.getMinutes();
    var ss = now.getSeconds();

    var clock = year + "-";
    if(month < 10) clock += "0";
    clock += month + "-";
   
    if(day < 10) clock += "0";
    clock += day + " ";
   
    if(hh < 10) clock += "0";  
    clock += hh + ":";

    if (mm < 10) clock += &#39;0&#39;; 
    clock += mm + ":";

    if (ss < 10) clock += &#39;0&#39;; 
    clock += ss; 

    return(clock);
Copy after login

以上就是本文的全部内容,希望对大家的学习有所帮助,更多相关内容请关注PHP中文网! 

 相关推荐:

js数组随机排序的方法

Node.js使用superagent模拟GET/POST的请求

The above is the detailed content of About the implementation of JS effect function. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template