How to scroll to a specific position on a page using scrollBy

Pada posting kali ini akan dibahas "How to scroll to a specific position on a page using scrollBy"

Sample script untuk melakukan scroll seperti dibawah ini :

if (d.getElementById("idtarget").value != "") {
         var sTarget = d.getElementById("idtarget").value;
         
         if (d.getElementById(sTarget ) != null) {
                  window.scrollBy(0, d.getElementById(sTarget ).offsetTop);
                  d.getElementById(sPernr).style.backgroundColor = "yellow";
         }
}

Recommended Reading:
Copy From Clipboard in IE and Chrome

Semoga posting tentang "How to scroll to a specific position on a page using scrollBy" dapat bermanfaat.


Salam,

Popular posts from this blog

SmartObject property ID is a required property for selected method Create. Value must be set.

Cara inject USB 3.0 Driver pada instalasi Windows - How to Inject USB 3.0 Driver in Windows 7

Python Font Color in Console