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

K2 Error Value Cannot Be Null. Parameter Name: s In SmartView and SmartObject

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

Pentaho Spoon Error : "Could Not Create The Java Virtual Machine"