extjs新引进了bootstrap 可以在其中定义是否debug和用什么文件debug
(function() {
var scripts = document.getElementsByTagName('script'),
localhostTests = [
/^localhost$/, /*用于匹配以localhost开头的url*/
/\b(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(:\d{1,5})?\b/ // IP v4
],
host = window.location.hostname, /*服务器自带的hostname有的是host有的是localhost*/
isDevelopment = null,
queryString = window.location.search,
test, path, i, ln, scriptSrc, match;
for (i = 0, ln = scripts.length; i < ln; i++) {
scriptSrc = scripts[i].src;
match = scriptSrc.match(/bootstrap\.js$/);
if (match) {
path = scriptSrc.substring(0, scriptSrc.length - match[0].length);
break;
}
}
if (queryString.match('(\\?|&)debug') !== null) {
isDevelopment = true; /*如果url后缀有'?'+debug则为询问字符串,设isDevelopment为true*/
}else if (queryString.match('(\\?|&)nodebug') !== null) {
isDevelopment = false; /*如果url后缀有'?'+nodebug则为false*/
}
if (isDevelopment === null) {
for (i = 0, ln = localhostTests.length; i < ln; i++) {
test = localhostTests[i];
if (host.search(test) !== -1) {
isDevelopment = true;
break;
}
}
}
if (isDevelopment === null && window.location.protocol === 'file:') {
isDevelopment = true;
}
/*如果都不符合以上两个判定,且isDevelopment为null或url是由“file:”开头即允许以文件形式打开自动进行debug*/
document.write('<script type="text/javascript" charset="UTF-8" src="' +
path + 'ext-4/ext-all' + (isDevelopment ? '-debug' : '') + '.js"></script>'); /*这里是配置ext-all-debug的路径*/
})();
--------------------------------------------------------------------------------
浏览器中的header:
浏览器中的header配置了request和response分别记录了浏览器向服务器发出请求时发出信息的类型,状态及request的方法=>get或post;和服务器向浏览器返回的信息的类型和状态。
如果request是get方法,则可以通过在url后加name=value的方式传递参数,post方法一般在传递信息安全性要求较高或信息量比较大时使用。
示例:
Request URL:http://localhost:8080/ExtjsMVC/account_manager/app/app.js
Request Method:GET
Status Code:304 Not Modified //静态文件未修改
Request Headersview source
Accept:*/*
Accept-Charset:ISO-8859-1,utf-8;q=0.7,*;q=0.3
Accept-Encoding:gzip,deflate,sdch //接受文件类型
Accept-Language:en-US,en;q=0.8
Cache-Control:max-age=0
Connection:keep-alive
Host:localhost:8080
If-Modified-Since:Fri, 03 Jan 2014 02:53:35 GMT
If-None-Match:W/"434-1388717615724"
Referer:http://localhost:8080/ExtjsMVC/account_manager/index.html
User-Agent:Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.64 Safari/537.31
Response Headersview source
Date:Fri, 03 Jan 2014 03:02:20 GMT
ETag:W/"434-1388717615724"
Server:Apache-Coyote/1.1
分享到:
相关推荐
bootstrap.js是ExtJS库的引导文件,通过参数可以自动切换ext-all.js和ext-all-debug.js. ext-all.js文件是ExtJS的核文件,是必须要引入的。 ext-all-debug.js文件是ext-all.js的调试版,在调试时需要使用到调试版。
Extjs4.2.1核心包,做学习测试用,拷贝这些文件就行了,如果拷贝完整的包,机子很容易卡死,有这个核心就够了,不用去把完整的包全部拷贝到项目中去 ...<script src="extjs/ext-all-debug.js"></script>
ExtJS-3.4.0文档目录说明: ◊ adapter目录下是EXT的核心代码和底层库,包括jQuery、Prototype和YUI的适配器。 ◊ docs目录下是EXT的文档。 ◊ examples目录下是官方的演示示例。 ◊ pkgs目录下是EXT压缩后...
该教程分为三部分: 1、开始使用extjs 2、组件的介绍以及应用 ...<script type="text/javascript" src="extjs3.2/ext-all-debug.js"> <script type="text/javascript" src="extjs3.2/ext-lang-zh_CN.js"></script>
该代码仅适用于ExtJs5.x, 使用方法: 在Extjs5.x.js文件后引入以下两文件,注意顺序...<script type="text/javascript" src="ext/5.1/ext-all-debug.js"> ${src}/DateTimePicker.js"> ${src}/DateTime.js"></script>
ExtJS .net分页例子SqlConnection con = new SqlConnection(); con.ConnectionString = System.Configuration.ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString;//ConnectionString ...
ext-all.js ext-debug-all.js 只有这两个文件,如果还需要其它文件,请@我,收个1分吧,最近缺分了!
ExtJS为开发者在开发富客户的B/S应用中提供丰富的UI组件,具有统一的主题,便于快速开发,提高效率。但显然它并不适合互联网站的... bootstarp.js:ExtJS库引导文件,可自动切换ext-all.js与ext-all-debug.js; ext-all
extjs-沙盒 $ npm安装 $凉亭安装 #运行应用 Linux或Mac $ DEBUG = extjs-sandbox npm开始 视窗 SET DEBUG = extjs-沙盒&npm开始
问题一个页面有两个面板,都...代码示例 代码如下:/// ”Ext/ext-all-debug-w-comments.js”> Ext.onReady(function () { var viewport = Ext.create(‘Ext.container.Viewport’, { layout: { type: ‘vbox’, al
如果域名地址是ip地址,会加载ext-all-debug.js文件,如果是域名,会加载ext-all.js。onReady函数也写好了,等下的脚本代码只要加入注释“在此添加ExtJS代码”就行了。在开始之前,要先知道,树节点的编辑与使用...
然后 myeclipse=>window=>preferences=>Spket=>JavaScript frofiles =>new(输入ExtJs)=>add library(选择Extjs)=>addfile(导入src下面的ext.jbs 文件、ext-all.js、ext-all-debug.js) 保存: 重启myeclipse
jsduck ext-all-debug.js packages/charts/classic/charts-debug.js other_files.js --export=full --output=/tmp/output_folder 使用/tmp/output_folder更新ExtConfig.properties jsduck_location运行...
当前官网下载的文件Bryntum-1.0-45d-trial.zip中sch-gantt-all-debug.js已经被加密,在使用的时候也出现购买提示,此版本已经解密,并且不显示购买提示。1.2使用ExtJs 3.4。 Ext Gantt 2.0哪位有破解的,也请能共享...
ext的源代码和帮助文档,实例。adapter、docs、examples、pkgs、srcresources、ext-all.js、ext-all-debug.js
龙博Ext Gantt甘特图最新2.07破解+中文包 ext-gantt\gnt-all-debug.js ext-gantt\sch-lang-zh_CN.js ext-min\ext-lang-zh_CN.js http://www.longboo.com/ http://bryntum.com/