javascript - Scroll to DIV location when rendering a JSP -


i'm trying browser automatically scroll div location when rendering jsp page. div can anywhere on page , has unique identifier.

i know there way using javascript/jquery in case want scroll occur after page loaded.

basically users clicks on link, request goes server , new page rendered browser. here want browser automatically scroll div.

any ideas? in advance.

in javascript can use:

var scrolltodiv = document.getelementbyid("mydiv"); scrolltodiv.scrollintoview(true); 

Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -