分享一下我老师大神的人工智能教程!零基础,通俗易懂!http://blog.csdn.net/jiangjunshow
也欢迎大家转载本篇文章。分享知识,造福人民,实现我们中华民族伟大复兴!
扩展js类库,在项目中建立一个 js文件,命名为:xxx.js 其代码为:
if ('function' !== typeof RegExp.escape) { RegExp.escape = function (s) { if ('string' !== typeof s) { return s; } return s.replace(/([.*+?^=!:${}()|[\]\/\\])/g, '\\$1'); };}Ext.ns('Ext.form');Ext.form.MultiSelect = Ext.extend(Ext.form.ComboBox, { checkField: 'checked', multi: true, separator: ',', initComponent: function () { if (!this.tpl) { this.tpl = '<tpl for=".">' + '<div class="x-combo-list-item">' + '<img src="' + Ext.BLANK_IMAGE_URL + '" ' + 'class="ux-MultiSelect-icon ux-MultiSelect-icon-' + '{[values.' + this.checkField + '?"checked":"unchecked"' + ']}">' + '{[values.' + this.displayField + ']}' + '</div>' + '</tpl>'; } Ext.form.MultiSelect.superclass.initComponent.apply(this, arguments); this.on( { scope: this, beforequery: this.onBeforeQuery, blur: this.onRealBlur }); this.onLoad = this.onLoad.createSequence(function () { if (this.el) { var v = this.el.dom.value;