Browse Source

:sparkles: 添加js显示行号函数

visuddhinanda@gmail.com 4 years ago
parent
commit
9934631e65
1 changed files with 4 additions and 0 deletions
  1. 4 0
      public/app/public/js/comm.js

+ 4 - 0
public/app/public/js/comm.js

@@ -292,6 +292,10 @@ function testCJK(string){
 	return reg.test(string);
 	return reg.test(string);
 
 
 }
 }
+//显示程序行号
+function get_line(){
+    return (new Error().stack.split(':')[7]);
+}
 
 
 //所有页面都需要在加载的的时候设置浏览器时区
 //所有页面都需要在加载的的时候设置浏览器时区
 setTimeZone();
 setTimeZone();