开发者

MVC Edit View, JQuery change

I have an MVC view with the following jquery.

<script type="text/javascript" language="javascript">
    $(document).ready(function () {
        $('#myinput).change(function () {
            alert('Changed');
   开发者_运维知识库     });
    });
</script>

When I change the text in the 'myinput' box, I want the alert 'Changed' to be displayed. This works fine... On the second change. The first time the text is changed, nothing happens.

What am I doing wrong?


try keyup instead of change


The strange behaviour appears to be a bug in jQuery 1.4.1. After upgrading to 1.4.2, the event worked as documented.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜