贫僧不舍 贫僧不舍
关注数: 7 粉丝数: 67 发帖数: 1,541 关注贴吧数: 24
计算机专业必备(详解javascript面向对象) 示例代码如下(不懂或者不明白的可以发问): <script type="text/javascript"> <%-- function Myclass(name,age) { this.name=name; this.age=age; }; function Myclass1(name1,age1) { this.name1=name1; this.age1=age1; }; Myclass.prototype={ toString:function(){ alert(this.name+":"+this.age); }, sayHello:function(){ alert("王二"+"你好"); } }; Myclass1.prototype={ toString:function(){ alert(this.name1+":"+this.age1); } }; var cal=new Myclass('张三',10); cal.toString(); cal.sayHello(); var cal1=new Myclass1('李四',11); cal1.toString(); //静态类 var staticMyclass = function(){}; staticMyclass.name="屌丝二逼"; staticMyclass.sum=function(value1,value2) { return value1+value2; } alert(staticMyclass.name); alert(staticMyclass.sum(3,8)); //继承(属性的继承) function porpleclass(){ this.type="人"; }; porpleclass.prototype={ getType:function(){ alert("这是一个人"); } }; //可使用apply方法将父对象的构造函数绑定在子对象上 function studentClss(name,sex){ porpleclass.apply(this,arguments); this.name=name; this.sex=sex; }; var stu=new studentClss("李玉凤","男"); alert(stu.name); alert(stu.type); --%> //类的继承 function porperClass(){ this.type="人"; }; porperClass.prototype={ getType:function(){ alert("这是一个人在练习类继承"); } }; function studentClass(name,sex){ porperClass.apply(this,arguments); for(var j in porperClass.prototype) { var poto = this.constructor.prototype; if(!j[j]) { poto[j]=porperClass.prototype[j]; } poto[j]["super"]=porperClass.prototype; } this.name=name; this.sex=sex; }; var stu=new studentClass("李玉凤","男"); alert(stu.name); alert(stu.type); stu.getType(); </script>
部署项目出现以下问题谁能给我说说 我从snv上直接搞下来项目后 ,在tomcat部署后,tomcat理没有编译的.class文件。后台出现以下错误。 1.严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean definition with name 'dataSource' defined in ServletContext resource [/WEB-INF/classes/spring_config/datasource-beans-config.xml]: Could not resolve placeholder 'datasource.url' at org.springframework.beans.factory.config.PropertyPlaceholderConfigurer.processProperties(PropertyPlaceholderConfigurer.java:287) at org.springframework.beans.factory.config.PropertyResourceConfigurer.postProcessBeanFactory(PropertyResourceConfigurer.java:75) at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:663) at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:638) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:407) at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:282) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:204) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3972) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4467) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardHost.start(StandardHost.java:785) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) at org.apache.catalina.core.StandardService.start(StandardService.java:519) at org.apache.catalina.core.StandardServer.start(StandardServer.java:710) at org.apache.catalina.startup.Catalina.start(Catalina.java:581) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414) 2013-3-4 6:29:26 org.apache.catalina.core.ApplicationContext log 信息: Set web app root system property: 'pleader.root' = [F:\apache-tomcat-6.0.26\webapps\performance_leader\] 2013-3-4 6:29:26 org.apache.catalina.core.ApplicationContext log 信息: Initializing log4j from [F:\apache-tomcat-6.0.26\webapps\performance_leader\WEB-INF\classes\log4j_config\log4j_local.xml] 2013-3-4 6:29:27 org.apache.catalina.core.StandardContext start
哪位大神来看看呀!愁死我了! /** ********************************************************************************************************************* */ ItemListGridPanel = Ext.extend(Ext.grid.EditorGridPanel, { constructor : function() { this["store"] = new Ext.data.GroupingStore({ url : ROOT + 'admin/managerEvalDbAction!look_workpending', reader : new Ext.data.JsonReader({ totalProperty : 'totalProperty', root : 'root' }, [{name:'db_code'},{ name : 'staff_name' }, { name : 'title' }, { name : 'post_name' }, { name : 'status' },{ name :'eval_code' },{ name :'company_code' },{ name :'dbtype' }]), sortInfo : { field : 'post_name', direction : "DESC" }, groupField : 'status' }), this.sm = new Ext.grid.CheckboxSelectionModel({ singleSelect : true }); ItemListGridPanel.superclass.constructor.call(this, { id : "gridpanel", viewConfig : { forceFit : true, enableColumnMove : false, autoScroll : true }, bodyStyle : 'width:100%;height:100%', autoWidth : true, autoHeight : true, autoExpandColumn : 'memory', collapsible : true, animCollapse : false, autoScroll : true, iconCls : 'grid-css', loadMask : { msg : "数据加载中,请稍等 " }, getSelected : function() { return this.getSelectionModel().getSelected(); }, maskDisabled : true, bbar : new Ext.ux.plugins.ProgressPagingToolbar({ pageSize : GRID_PAGE_SIZE, store : this.store, displayInfo : true, displayMsg : '显示第 {0} 条到 {1} 条记录,一共 {2} 条', emptyMsg : "没有记录" }), enableColumnMove : false, colModel : new Ext.grid.ColumnModel([new Ext.grid.RowNumberer(),this.sm,{ header : "姓名", align : "left", menuDisabled : false, dataIndex : "staff_name", renderer : function(value, cellMeta, record, rowIndex, columnIndex, store){ var dbtype = record.get('dbtype'); var staff_name = record.get('staff_name'); var db_code = record.get('db_code'); var eval_code = record.get('eval_code'); var job_type=record.get('job_type'); //alert(db_code); if (staff_name!=null) //return staff_name; return "<a href='#' onclick=downloadFile();>"+staff_name+"</a>"; } }, { header : "待办名称", align : "left", menuDisabled : false, dataIndex : "title" }, { header : "职务", align : "left", menuDisabled : false, dataIndex : "post_name" },{ header : "待办状态", align : "left", menuDisabled : false, dataIndex : "status" },{ header : "待办状态", align : "left", menuDisabled : false, dataIndex : "db_code", hidden:true },{ header : "待办状态", align : "left", menuDisabled : false, dataIndex : "eval_code", hidden:true },{ header : "待办状态", align : "left", menuDisabled : false, dataIndex : "company_code", hidden:true },{ header : "待办状态", align : "left", menuDisabled : false, dataIndex : "dbtype", hidden:true }]), view : GroupingView }); this.getStore().on('beforeload', function() { Ext.apply(this.baseParams, { evalcode : Ext.get("eval_code").getValue(), dbtype : Ext.get("staff_name").getValue() }); }); }, getSelected : function() { var _sm = this.getSelectionModel(); dbtype = Ext.get("staff_name").getValue(); alert(dbtype); if (_sm.getCount() == 0) { throw Error("你尚未选定一条记录"); } return _sm.getSelected(); } }); evalcode : Ext.get("eval_code").getValue(),这部为什么报错呀!
1 下一页