document.getElementById("comCountry").value = ConfigSettigs.Value1;
document.getElementById("comCountry").fireEvent('onchange');两句 总是先执行下面的那句
而先执行下面的 那个Onchange函数调用事件就出问题了
document.getElementById("comCountry").fireEvent('onchange');两句 总是先执行下面的那句
而先执行下面的 那个Onchange函数调用事件就出问题了
解决方案 »
- 跳转页面问题
- SqlDataAdapter是不是只能填充dataset,不能fill(填充)datatable哈
- 水晶报表,中的文本上标问题!急~@!~~~ 在线等!~~·
- .net运行错误问题
- 请问 .NET 中 的 session 是不是 对于 每个 IE浏览器都是 独立的 ??????????????????????急!!!!!!!!!!!!
- 如何在客户端打开页时,用文件流的方法把服务器虚拟目录中的文件,生成文件,放到客户端指定的目录。有好的思路也给分.
- 请教一下asp.net访问共享目录的问题
- 仿易迅左右移动的相册效果是如何实现的,想用JS实现,能不能给点指导
- 关于Ajax的页面停滞问题
- 自动插入ID的触发器
- .net程序里面的bin目录里面是一般放什么东西啊?
- 拜托各位老大解决一下"TreeView"控件的一个问题?
这个是直接触发,不管内容有没有改变都强制执行document.getElementById("comCountry").value = ConfigSettigs.Value1;
这个是自然触发,当内容改变后才去执行这两个不是一个概念
可是这个根本没有触发 onchange事件啊
而OnLoad的时候下拉框里面还没有值,直接加载的就是这个值,所以不会触发
Onchange函数啊
Fairyland.Main.Ajax.ConfigureMng.ConfigureMngAjax.SelectConfig("国家",
function(result) {
if (result != null && result.value.IsSuccess) { var ConfigSettigs = result.value.Obj;
document.getElementById("comCountry").value = ConfigSettigs.Value1
if (ConfigSettigs.Value2 == "true") {
document.getElementById("chkcountry").checked = true;
} else {
document.getElementById("chkcountry").checked = false;
}
}
else {
ymPrompt.errorInfo({ message: result.value.ErrorMessage, handler: null, width: 400, height: 200, title: "消息提示框" });
}
SetWinHeight(null);
});
Fairyland.Main.Ajax.ConfigureMng.ConfigureMngAjax.SelectConfig("省份",
function(result) {
if (result != null && result.value.IsSuccess) {
var ConfigSettigs = result.value.Obj;
document.getElementById("cboProvince").value = ConfigSettigs.Value1
if (ConfigSettigs.Value2 == "true") {
document.getElementById("chkprovinces").checked = true;
} else {
document.getElementById("chkprovinces").checked = false;
}
}
else {
ymPrompt.errorInfo({ message: result.value.ErrorMessage, handler: null, width: 400, height: 200, title: "消息提示框" });
}
SetWinHeight(null);
}); Fairyland.Main.Ajax.ConfigureMng.ConfigureMngAjax.SelectConfig("城市",
function(result) {
if (result != null && result.value.IsSuccess) {
var ConfigSettigs = result.value.Obj;
document.getElementById("cboCities").value = ConfigSettigs.Value1
if (ConfigSettigs.Value2 == "true") {
document.getElementById("chkcity").checked = true;
} else {
document.getElementById("chkcity").checked = false;
}
}
else {
ymPrompt.errorInfo({ message: result.value.ErrorMessage, handler: null, width: 400, height: 200, title: "消息提示框" });
}
SetWinHeight(null);
});
var result = Fairyland.Main.Ajax.ComboMngAjax.ComProvincesList(1, document.getElementById("comCountry").value);
if (result.value.IsSuccess) {
document.getElementById("ProvinceList").innerHTML = result.value.Obj;
}
if (document.getElementById("comCountry").selectedIndex == 0) {
document.getElementById("cboProvince").selectedIndex = 0;
}
}
function BindCitys() {
var result = Fairyland.Main.Ajax.ComboMngAjax.ComCitiesList(1, document.getElementById("cboProvince").value);
if (result.value.IsSuccess) {
document.getElementById("CityList").innerHTML = result.value.Obj;
}
if (document.getElementById("cboProvince").selectedIndex == 0) {
document.getElementById("cboCities").selectedIndex = 0;
}
}
function bindAreas() {
var result = Fairyland.Main.Ajax.ComboMngAjax.ComAreasList(1, document.getElementById("cboCities").value);
if (result.value.IsSuccess) {
document.getElementById("AreaList").innerHTML = result.value.Obj;
}
if (document.getElementById("cboCities").selectedIndex == 0) {
document.getElementById("cboAreas").selectedIndex = 0;
}
}
function bindStreets() {
var result = Fairyland.Main.Ajax.ComboMngAjax.ComStreetsList(1, document.getElementById("cboAreas").value);
if (result.value.IsSuccess) {
document.getElementById("StreetList").innerHTML = result.value.Obj;
}
if (document.getElementById("cboAreas").selectedIndex == 0) {
document.getElementById("cboStreets").selectedIndex = 0;
}
}
这个OnChange