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,
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,