📄 common.js
字号:
var $ = function(o) { return document.getElementById(o); };
var w = function(s) { document.write(s); };
String.prototype.trim = function() { return this.replace(/^\s+|\s+$/g, ""); };
String.prototype.isEmail = function() { return (/^(\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*)$/.test(this)); };
String.prototype.left = function(n) { return this.slice(0, n); };
String.prototype.isPath = function() { return /^[a-z]\:[^\<\>\|\:\.\?\*\"]*/i.test(this); };
var page = {};
page._onloads_ = [];
page.onload = function(f) { this._onloads_.push(f); };
window.onload = function(e) { for (var i=0; i<page._onloads_.length; i=i+1) page._onloads_[i](e); };
var refreshVCode = function(img) { img.src = "servlet/VCode?" + Math.random(); };
var showVCode = function() { w("<img title='看不清?点击换一张' onclick=\"JavaScript:refreshVCode(this);\" onerror=\"JavaScript:refreshVCode(this);\" src=\"about:blank\" border='0' width='40' height='18' />"); };
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -