Style files for resources/css/ext-all.css, extjs js library file mainly contains two, adapter/ext/ext-base.js and ext-all.js, where ext-base.js represents the framework base library, ext-all.js is the core library of extjs. Adapter represents the adapter, that is, there can be a variety of adapters, so you can replace adapter/ext/ext-base.js with adapter/jquery/ext-jquery-adapter.js, or adapter/prototype/ext-prototype-adapter.js and so on.
Therefore, pages that use the ExtJS framework generally include the following:
Copy codeThe Code is as follows:
<Link rel = "stylesheet" type = "text/css" href = "extjs/resources/css/ext-all.css"/>
<Script type = "text/javascript" src = "extjs/adapter/ext/ext-base.js"> </script>
<Script type = "text/javascript" src = "extjs/ext-all.js"> </script>
After the ExtJS library file and page content are loaded, ExtJS will execute Ext. the functions specified in onReady can be used. Generally, each user's ExtJS application is from Ext. from onReady, the code for using the ExtJS application is roughly as follows:
Copy codeThe Code is as follows:
<Script> function fn () {alert ('extjs Library added ');} Ext. onReady (fn); </script>
Fn can also be written as an anonymous function, so the above Code can be changed to the following form:
Copy codeThe Code is as follows:
<Script> function fn () {alert ('extjs library loaded! ');} Ext. onReady (function () {alert ('extjs library loaded! ') ;}); </Script>