1. JS Dapatkan lebar halaman dan tinggi dan resolusi layar
Lebar area yang terlihat dari halaman web: document.body.clientwidth ketinggian area yang terlihat dari halaman web: document.body.clientheight Lebar area yang terlihat dari halaman web: document.body.offsetwidth (termasuk lebar lini. Teks Halaman Teks Lengkap Tinggi: Document.Body.ScrollHeight Halaman Web Diterbitkan Tingginya: Document.Body.scrolltop Halaman Web Digulung Kiri Kiri: Document.Body.scrollleft Web Page Bagian: Window.Screentop Halaman Web Teks Kiri: Window.Screenleft Resolution Resolution Tingginya: Window.Screen.Height Resolution Resolution: Window.creenleft Resolution Tingginya: window.screen.height Resolution resolution width: windowscere.creerc.scole Tingginya: window.screen.height Resolution resolution width: windowscercercerc.scum sudu -wuplespace window.screen.availheight layar tersedia lebar ruang kerja: window.screen.availwidth
2. Js mendapatkan panjang input
document.geteLementById ("Nilai ID Input"). Style.width = document.body.scrollwidth * 0,24 - 550;3. Pusat dan Sejajarkan Kotak Input Input
<input type = "text" style = "text-align: center;" />