문제

I want to run a specific jQuery/JS code on any browser but IE.

Currently I am using this, but it does not work in Chrome:

    <!--[if !IE]>
    <script type="text/javascript">
        $(document).ready(function(){
            alert("non ie");
            $("#login_userid").focus();
        });
    </script>
    <![endif]-->

The alert nor the focus part is executed.

도움이 되었습니까?

해결책

i think you need

<![if ! IE]>

<![endif]>
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top