教育培训网二次开发笔记
课程,机构所在地区单选改为多选:
1.修改的地方有max:1改为10,multi: false改为true, 最后areaValues('<%= datcouplace="">'); 改为areaValues([<%= datcouplace="">]);
//所在地区
$('#btnCouPlace').click(function(event) {
event.preventDefault();
}).bindArea({ max: 10, multi: true, inputName: 'txt_CouPlace', selectTo: '', onChanged: function(data) {
var html = '', i = 0, len = data.length;
for (i; i < len; i++) {
var d = data[i];
html += getAreaName(d) + '+';
}
if (html.length > 1) {
html = html.substring(0, html.length - 1);
$('#btnCouPlace').attr('title', html);
}
else {
$('#btnCouPlace').attr('title', '');
}
if (html.length > 19) {
html = html.substring(0, 19) + '...';
}
if (html.length > 0) {
html = '<label><b>' + html + '</b></label>';
$('#btnCouPlace').html(html);
}
else {
$('#btnCouPlace').html('<b>请选择</b>');
}
}
}).areaValues([<%= datCouPlace %>]);2. 在代码里找到datCouPlace = publics.OneArray(CouPlace);改为datCouPlace = publics.MultID(CouPlace);
3.数据库(存储过程)要把相应的字段改为varchar(300)
获取提交数据处改:OneArray 改为 AllArray LocusArea = publics.ReplaceString(publics.AllArray(txt_LocusArea.Text.ToString()));
C#过滤Html标签方法:
using System.Text.RegularExpressions;//引入 Content = Regex.Replace(Content, "<.*?>", string.Empty);