📄 jquery.js
字号:
* @param {string}
* domain (optional, exp: '.a.com')
* @param {boolean}
* secure (optional, exp: false)
*/
this.set = function() {
var args = this.set.arguments;
var _num = args.length;
if (_num < 2) {
return;
}
var _cookie = args[0] + '=' + this._encode(args[1]);
if (_num >= 3) {
var now = new Date();
var _expires = new Date(now.getTime() + args[2]);
_cookie += ';expires=' + _expires.toUTCString();
}
if (_num >= 4) {
_cookie += ';path=' + args[3];
}
if (_num >= 5) {
_cookie += ';domain=' + args[4];
}
if (_num >= 6) {
_cookie += ';secure';
}
document.cookie = _cookie;
}
this.print_r = function() {
this._reset();
for (var i in this.cookies) {
alert(i + ' -> ' + this.cookies[i]);
}
}
this._reset = function() {
var cookie = document.cookie.split(';');
var _num = cookie.length;
for (var i = 0;i < _num; i++) {
var _arr = cookie[i].split('=');
var _name = this._trim(_arr[0]);
var _value = '';
if (typeof _arr[1] != 'undefined') {
_value = this._decode(this._trim(_arr[1]));
}
this.cookies[_name] = _value;
}
}
this._trim = function(_str) {
return _str.replace(/(^\s+)|(\s*$)/g, '');
}
this._encode = function(_str) {
return encodeURI(_str);
}
this._decode = function(_str) {
return decodeURI(_str);
}
}
Pn.Cookie.countPerPage = "_countPerPage";
Pn.ns('Pn.LTable');
Pn.LTable.lineOver=function(o){
$(o).addClass("pn-lhover");
};
Pn.LTable.lineOut=function(o){
$(o).removeClass("pn-lhover");
};
Pn.LTable.lineSelect=function(o){
if(Pn.LTable.lineSelected){
$(Pn.LTable.lineSelected).removeClass("pn-lselected");
}
Pn.LTable.lineSelected=o;
$(o).addClass("pn-lselected");
}
Pn.ns('Pn.Tree');
Pn.Tree.switchDisplay=function(id,open) {
var isDisplay = $('#'+id+'-s').attr("isDisplay");
if(open&&isDisplay=="true") {
return;
}
if(isDisplay=="true") {
$('#'+id+'-co').hide();
$('#'+id+'-fo').hide();
$('#'+id+'-cc').show();
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -