Blur事件中的IE 9未在jquery中触发 [英] IE 9 on Blur event is not firing in jquery
本文介绍了Blur事件中的IE 9未在jquery中触发的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Onblur活动在IE9中没有被激活。
看到这是我的代码。
function CheckRow(id){
var ids = id.split( ' _');
var txt = ids [ 2 ];
// document.getElementById('btnSave')。disabled = true;
// document.getElementById('hdnStatus')。value =;
< span class =code-comment> // document.getElementById(''+ ids [0] +'_'+ ids [1] +'_'+ 'hdnSplitAmount')。value ='';
$( # divgv table tr)。each(function(){
var tr = $( this )。nearest( tr);
$(tr)。 find( input:text [id $ = + txt + ])。更改(
函数( event ){
var txtval = $( this 跨度>)VAL();
var hdn = $(tr).find( 输入:隐藏[ID $ = hdnAmount]跨度>)VAL();
if (txtval!= undefined&& hdn!= undefined){
txtval = Number(txtval);
hdn = Number(hdn);
var chk = $(tr).find( 输入:复选框[ID $ = chkBox]跨度>);
if (hdn!= txtval){
chk.attr(' 选中', true );
// document.getElementById('btnSave')。disabled = false;
// document.getElementById('hdnStatus')。value =已更改;
}
else {
chk.attr(' 选中', false );
}
document.getElementById(' hdnStatus')。 value = 已更改;
}
}
);
});
}
模糊事件我正在调用此函数,但这不是workig,并且该复选框也未检查。 ie9工作正常。
请帮帮我...
解决方案
( #divgv table tr)。each(function(){
var tr =
( this )。nearest( tr);
(tr).find( 输入:文本[ID
Hi,
Onblur Event is not Firing in IE9.
See this is my code.
function CheckRow(id) {
var ids = id.split('_');
var txt = ids[2];
//document.getElementById('btnSave').disabled = true;
//document.getElementById('hdnStatus').value = "";
//document.getElementById(''+ ids[0] + '_' + ids[1] + '_' + 'hdnSplitAmount').value='';
$("#divgv table tr").each(function() {
var tr = $(this).closest("tr");
$(tr).find("input:text[id$=" + txt + "]").change(
function(event) {
var txtval = $(this).val();
var hdn = $(tr).find("input:hidden[id$=hdnAmount]").val();
if (txtval != undefined && hdn != undefined) {
txtval = Number(txtval);
hdn = Number(hdn);
var chk = $(tr).find("input:checkbox[id$=chkBox]");
if (hdn != txtval) {
chk.attr('checked', true);
// document.getElementById('btnSave').disabled = false;
//document.getElementById('hdnStatus').value = "Changed";
}
else {
chk.attr('checked', false);
}
document.getElementById('hdnStatus').value = "Changed";
}
}
);
});
}
on blur event i am calling this function but this not workig and that check box also not checked .other than ie9 it is working fine.
Please help me ...
解决方案
("#divgv table tr").each(function() { var tr =
(this).closest("tr");
(tr).find("input:text[id
这篇关于Blur事件中的IE 9未在jquery中触发的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文