How to avoid focusing to Date or text field in a Visualforce page?

How to avoid focusing to Date or text field in a Visualforce page?

Add the below code in the Visualforce page to avoid focusing to Date or text field.

    <script>
        window.onload = function(){
            window.scrollTo(0,0);
        };
    </script>




Cheers!!!

Leave a Reply