Blur event does not work in IE11 and IE10

I have a text field in my ASP.Net MVC application, and I need to do some checking when the text field loses focus, so I used the blur event.

The event below works fine in the Chrome browser, but does not work in IE11 and IE10.

Script Code:

$("#NewFileName").on("blur", function () {
alert('triggered');
});

ASP.NET MVC HTML:

<div class ="span6">
                <p>
                    @Html.TextBoxFor(m => m.FileName, new { type = "file" }) 
                </p>
</div>

I tried to use various events, such as "focusout" for IE, but the focus / blur event does not work in IE. What is the correct event for IE10 and 11 browsers?

+4
source share
1 answer

focus blur IE - :

Windows Internet Explorer 8 , (input type = file) . . , value .

, . ( ) . , .

NewFileName ID :

@Html.TextBoxFor(m => m.FileName, @id = "NewFileName") 

:

Microsoft Internet Explorer 5 , , TABINDEX.

+4

All Articles