Minggu, 02 Desember 2012

You are here : Home » Ketagihan Javascript 3 » Membuat Pop Up Suatu Halaman

Membuat Pop Up Suatu Halaman

Jika sebelumnya KB meluncurkan postingan membuat Pop Up Viewer untuk gambar melalui link teks atau juga Jump Menu, kali ini KB membagikan tutorial cara membuat Pop Up Viewer untuk suatu halaman (page).

Contohnya seperti di bawah ini, silahkan klik.

Buka Chat Box

Nah, Agan sudah paham ??

Untuk kodenya sendiri silahkan Agan salin.

<script language="javascript" type="text/javascript">
/* Visit http://ketagihanbaca.blogspot.com/ for full source code
and get more free JavaScript, CSS and DHTML scripts! */
<!-- Begin
function NewWindow(mypage, myname, w, h, scroll) {
var winl = (screen.width - w) / 2;
var wint = (screen.height - h) / 2;
winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable'
win = window.open(mypage, myname, winprops)
if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}
//  End -->
</script>
<center>
<!-- Put the URL inside the link's href="..." section, then carefully -->
<!-- change 'name' to a name for your popup window.  The last three -->
<!-- items represent the popup window width, height, and scrollbars. -->
<a href="http://ketagihanbaca.blogspot.com/2012/11/chat.html" onclick="NewWindow(this.href,'name','900','800','yes');return false;">Buka Chat Box</a>
</center>


Selamat mencoba.

5 komentar: