⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 examples.js

📁 着重用css实现页面显示功能,实现简单数据库连接,是很好的入门教程
💻 JS
字号:
/*
 * Ext JS Library 1.1.1
 * Copyright(c) 2006-2007, Ext JS, LLC.
 * licensing@extjs.com
 * 
 * http://www.extjs.com/license
 */

Ext.BLANK_IMAGE_URL = 'ext/resources/images/default/s.gif';Ext.example = function(){    var msgCt;    function createBox(t, s){        return ['<div class="msg">',                '<div class="x-box-tl"><div class="x-box-tr"><div class="x-box-tc"></div></div></div>',                '<div class="x-box-ml"><div class="x-box-mr"><div class="x-box-mc"><h3>', t, '</h3>', s, '</div></div></div>',                '<div class="x-box-bl"><div class="x-box-br"><div class="x-box-bc"></div></div></div>',                '</div>'].join('');    }    return {        msg : function(title, format){            if(!msgCt){                msgCt = Ext.DomHelper.insertFirst(document.body, {id:'msg-div'}, true);            }            msgCt.alignTo(document, 't-t');            var s = String.format.apply(String, Array.prototype.slice.call(arguments, 1));            var m = Ext.DomHelper.append(msgCt, {html:createBox(title, s)}, true);            m.slideIn('t').pause(1).ghost("t", {remove:true});        },        init : function(){            var s = Ext.get('extlib'), t = Ext.get('exttheme');            if(!s || !t){ // run locally?                return;            }            var lib = Cookies.get('extlib') || 'ext',                 theme = Cookies.get('exttheme') || 'aero';            if(lib){                s.dom.value = lib;            }            if(theme){                t.dom.value = theme;                Ext.get(document.body).addClass('x-'+theme);            }            s.on('change', function(){                Cookies.set('extlib', s.getValue());                setTimeout(function(){                    window.location.reload();                }, 250);            });            t.on('change', function(){                Cookies.set('exttheme', t.getValue());                setTimeout(function(){                    window.location.reload();                }, 250);            });        }    };}();Ext.onReady(Ext.example.init, Ext.example);// old school cookie functions grabbed off the webvar Cookies = {};Cookies.set = function(name, value){     var argv = arguments;     var argc = arguments.length;     var expires = (argc > 2) ? argv[2] : null;     var path = (argc > 3) ? argv[3] : '/';     var domain = (argc > 4) ? argv[4] : null;     var secure = (argc > 5) ? argv[5] : false;     document.cookie = name + "=" + escape (value) +       ((expires == null) ? "" : ("; expires=" + expires.toGMTString())) +       ((path == null) ? "" : ("; path=" + path)) +       ((domain == null) ? "" : ("; domain=" + domain)) +       ((secure == true) ? "; secure" : "");};Cookies.get = function(name){	var arg = name + "=";	var alen = arg.length;	var clen = document.cookie.length;	var i = 0;	var j = 0;	while(i < clen){		j = i + alen;		if (document.cookie.substring(i, j) == arg)			return Cookies.getCookieVal(j);		i = document.cookie.indexOf(" ", i) + 1;		if(i == 0)			break;	}	return null;};Cookies.clear = function(name) {  if(Cookies.get(name)){    document.cookie = name + "=" +    "; expires=Thu, 01-Jan-70 00:00:01 GMT";  }};Cookies.getCookieVal = function(offset){   var endstr = document.cookie.indexOf(";", offset);   if(endstr == -1){       endstr = document.cookie.length;   }   return unescape(document.cookie.substring(offset, endstr));};

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -