<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script type="text/javascript" src="LoaderDemo/ext-bootstrap-debug.js"></script>
<!--<script type="text/javascript" src="js/ext-4.0.7-gpl/bootstrap.js"></script>-->
<script>
Ext.Loader.setConfig({
enabled: true,
basePath: 'js'
});
Ext.require("Product");
function test() {
var product = new Product();
alert("name: " + product.name);
}
</script>
</head>
<body>
<button onclick="test();">TEST</button>
</body>
</html>
如图,请问一下,我使用的是ext-4.0.7-gpl的开发包,引入的js脚本文件为
ext-4.0.7-gpl/bootstrap.js,此时,动态加载脚本,是不成功的,总是提示,Product未定义。而参考动态引入的Demo,将它引入的js加载到页面,代码不用做任何修改,功能正常,请问这是什么问题呢、