Lanjutan part 06, kode hmtl beserta contohnya.
02. Kode Buka Window baru pada semua link di blog
01. Kode buka Popup Window
<script language="javascript">
var popupWindow = null;
function centeredPopup(url,winName,w,h,scroll){
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
settings =
'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable'
popupWindow = window.open(url,winName,settings)
}
</script>
<a href="http://dl.dropbox.com/u/15145201/achoshare/bookmark%20contac.swf" onclick="centeredPopup(this.href,'myWindow','500','500','yes');return false">Hubungi Kami</a>
Contoh :
Hubungi Kami
var popupWindow = null;
function centeredPopup(url,winName,w,h,scroll){
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
settings =
'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable'
popupWindow = window.open(url,winName,settings)
}
</script>
<a href="http://dl.dropbox.com/u/15145201/achoshare/bookmark%20contac.swf" onclick="centeredPopup(this.href,'myWindow','500','500','yes');return false">Hubungi Kami</a>
Contoh :
Hubungi Kami
02. Kode Buka Window baru pada semua link di blog
Kode berikut adalah kode untuk membuat semua link dalam blog anda akan terbuka di jendela baru.
letakkan kode diantara <HEAD> dan </HEAD>
<base target="main">
03. Kode klik satu kali, akan membuka banyak link di Window baru
<a href="http://arsip-trik.blogspot.com/" onclick="window.open("http://arsip-trik.blogspot.com/2011/06/html-kode-part-01.html"); window.open("http://arsip-trik.blogspot.com/2011/06/html-kode-part-02.html");" target="_blank">Artikel Lain Mengenai Kode</a></div>
<a href="URL MU 01" target="_blank" onclick="window.open(""URL MU 02""); window.open(""URL MU 03
"");">teks MU</a>
Contoh :
Contoh :
04. Kode Navigasi Halaman Dibawah Postingan
<style type='text/css'>
.showpageArea a {text-decoration:none;}
.showpageNum a,.showpage a {
color:#333333;
text-decoration:none;
border: 1px solid #cccccc;
margin:0 3px;
padding:3px 7px;
background-color:none;
}
.showpageNum a:hover, .showpage a:hover, .showpagePoint {
color:#333333;
border: 1px solid #cccccc;
padding:3px 7px;
background-color:#cccccc;
margin:0 3px;
}
.showpageOf {
color:#333;
text-decoration:none;
padding:3px 7px;
margin: 0 3px 0 0;
}
</style>
<script style='text/javascript'>
var pageCount=5;
var displayPageNum=5;
var upPageWord="Previous";
var downPageWord="Next";
</script>
<script style='text/javascript' src='http://bloggerblogwidgets.googlecode.com/files/bloggerpnav.js'></script>
.showpageArea a {text-decoration:none;}
.showpageNum a,.showpage a {
color:#333333;
text-decoration:none;
border: 1px solid #cccccc;
margin:0 3px;
padding:3px 7px;
background-color:none;
}
.showpageNum a:hover, .showpage a:hover, .showpagePoint {
color:#333333;
border: 1px solid #cccccc;
padding:3px 7px;
background-color:#cccccc;
margin:0 3px;
}
.showpageOf {
color:#333;
text-decoration:none;
padding:3px 7px;
margin: 0 3px 0 0;
}
</style>
<script style='text/javascript'>
var pageCount=5;
var displayPageNum=5;
var upPageWord="Previous";
var downPageWord="Next";
</script>
<script style='text/javascript' src='http://bloggerblogwidgets.googlecode.com/files/bloggerpnav.js'></script>
05. Beberapa arti beberapa Kode
- & adalah &
- < adalah <
- > adalah >
- " adalah "