KALABAKAN 0 Report post Posted September 27, 2010 Assalamualaikum guys, ada sedikit pertanyaan ni bagi org2 yg pakar dalam javascript.. jalan cerita nya camni aku nak buat satu page... yang mana bila page di buka maka automatik windows lain di tutup sendiri means let say aku click URL then dia akan buka ke new windows pabila new windows di buka automaticly oter tab atau windows closed ada cara tak aku dah byk reffer kat google tapi mostly tak menjadik la mekasih semua ... Quote Share this post Link to post Share on other sites
hotfloppy 19 Report post Posted November 23, 2010 kalo nak tutup window yg kita bukak menggunakan window.open, aku tau la.. [html] <html> <head><title>Miss my beskot so much </title> <script language="JavaScript"> <!--// Function untuk buka tetingkap myBeskotWindow //--> function myBeskotOpen() { myBeskotWindow = window.open ("http://www.hotfloppy.tk/", ""); } function myBeskotClose() { myBeskotWindow.close(); } <!--// Function untuk buka tetingkap myBeskotTetingkap //--> function myBeskotBuka() { myBeskotTetingkap = window.open ("http://www.google.com.my/", ""); } function myBeskotTutup() { myBeskotTetingkap.close(); } </script> </head> <body> <a href="JavaScript:myBeskotOpen()">Buka tetingkap 'myBeskotWindow'</a> <br> <a href="JavaScript:myBeskotClose()">Tutup tetingkap 'myBeskotWindow'</a> <br><br> <a href="JavaScript:myBeskotBuka()">Buka tetingkap 'myBeskotTetingkap'</a> <br> <a href="JavaScript:myBeskotTutup()">Tutup tetingkap 'myBeskotTetingkap'</a> </body> </html> [/html] p/s: saya budak baru belajar, kalo salah, tolong tunjukkan Quote Share this post Link to post Share on other sites