JavaScriptBank.com
20-04-2010, 15:47
Một đoạn giới thiệu giống kiểu Flash được hiển thị trước khi vào trang web. Hiệu ứng có cả chức năng 'Skip intro' nếu người dùng không muốn xem đoạn gi... chi tiết (http://www.javascriptbank.com/dynamic-html-splash-screen.html/vi//) tại JavaScriptBank.com - 2.000+ free JavaScript codes (http://www.javascriptbank.com/)
http://www.javascriptbank.com/javascript.images/browser/dynamic-html-splash-screen.jpg (http://www.javascriptbank.com/javascript/browser/page-effect/dynamic-html-splash-screen/preview/vi/)
Demo: JavaScript Đoạn giới thiệu kiểu Flash cho web (http://www.javascriptbank.com/dynamic-html-splash-screen.html/vi/)
| JavaScript Dynamic HTML Splash Screen (http://www.javascriptbank.com/dynamic-html-splash-screen.html)
Cách cài đặt
Bước 1: Đặt mã HTML bên dưới vào phần BODY
HTML
<DIV id=splashcontainer style="POSITION: absolute; WIDTH: 350px"></DIV><LAYER
id=splashcontainerns width="450"></LAYER>
<SCRIPT>
/*
Dynamic Splash Screen effect- © Dynamic Drive (www.dynamicdrive.com) Updated: 00/12/18
For full source code, installation instructions, 100's more DHTML scripts, and Terms Of Use,
Visit http://dynamicdrive.com
*/
//Specify the paths of the images to be used in the splash screen, if any.
//If none, empty out array (ie: preloadimages=new Array())
var preloadimages=new Array("bongbong.gif","bongbong.gif")
//configure delay in miliseconds between each message (default: 2 seconds)
var intervals=2000
//configure destination URL
var targetdestination="http://javascriptbank.com"
//configure messages to be displayed
//If message contains apostrophe('), backslash them (ie: "I'm fine")
var splashmessage=new Array()
var openingtags='<font face="Arial" size="4">'
splashmessage[0]='<img src="bongbong.gif"> JavaScriptBank.com <img src="bongbong.gif">'
splashmessage[1]='Bank of free JavaScript'
splashmessage[2]='over 2000+ free JavaScript code'
splashmessage[3]='please wait...'
var closingtags='</font>'
//Do not edit below this line (besides HTML code at the very bottom)
var i=0
var ns4=document.layers?1:0
var ie4=document.all?1:0
var ns6=document.getElementById&&!document.all?1:0
var theimages=new Array()
//preload images
if (document.images){
for (p=0;p<preloadimages.length;p++){
theimages[p]=new Image()
theimages[p].src=preloadimages[p]
}
}
function displaysplash(){
if (i<splashmessage.length){
sc_cross.style.visibility="hidden"
sc_cross.innerHTML='<b><center>'+openingtags+splashmessage[i]+closingtags+'</center></b>'
sc_cross.style.left=ns6?parseInt(window.pageXOffse t)+parseInt(window.innerWidth)/2-parseInt(sc_cross.style.width)/2 : document.body.scrollLeft+document.body.clientWidth/2-parseInt(sc_cross.style.width)/2
sc_cross.style.top=ns6?parseInt(window.pageYOffset )+parseInt(window.innerHeight)/2-sc_cross.offsetHeight/2 : document.body.scrollTop+document.body.clientHeight/2-sc_cross.offsetHeight/2
sc_cross.style.visibility="visible"
i++
}
else{
window.location=targetdestination
return
}
setTimeout("displaysplash()",intervals)
}
function displaysplash_ns(){
if (i<splashmessage.length){
sc_ns.visibility="hide"
sc_ns.document.write('<b>'+openingtags+splashmessage[i]+closingtags+'</b>')
sc_ns.document.close()
sc_ns.left=pageXOffset+window.innerWidth/2-sc_ns.document.width/2
sc_ns.top=pageYOffset+window.innerHeight/2-sc_ns.document.height/2
sc_ns.visibility="show"
i++
}
else{
window.location=targetdestination
return
}
setTimeout("displaysplash_ns()",intervals)
}
function positionsplashcontainer(){
if (ie4||ns6){
sc_cross=ns6?document.getElementById("splashcontainer"):document.all.splashcontainer
displaysplash()
}
else if (ns4){
sc_ns=document.splashcontainerns
sc_ns.visibility="show"
displaysplash_ns()
}
else
window.location=targetdestination
}
window.onload=positionsplashcontainer
</SCRIPT>
Bạn có thể xem các mã tương tự bên dưới
- Đoạn giới thiệu tuyệt vời với Flash và JavaScript (http://www.javascriptbank.com/tiptop-intro-along-with-flash-and-javascript.html/vi/)
- Đoạn giới thiệu mở đầu kiểu chớp giật (http://www.javascriptbank.com/flashy-dhtml-scroller.html/vi/)
- Đoạn giới thiệu cho web 2 (http://www.javascriptbank.com/document-wipes-effect.html/vi/)
Một vài nhãn tương tự: đoạn giới thiệu (http://www.javascriptbank.com/vi+tag=đoạn giới thiệu), giới thiệu (http://www.javascriptbank.com/vi+tag=giới thiệu), kiểu Flash (http://www.javascriptbank.com/vi+tag=kiểu Flash), Flash (http://www.javascriptbank.com/vi+tag=Flash), hiển thị (http://www.javascriptbank.com/vi+tag=hiển thị), chức năng (http://www.javascriptbank.com/vi+tag=chức năng), Skip intro (http://www.javascriptbank.com/vi+tag=Skip intro), [/URL]
Bạn có thể xem thêm nhiều JavaScript khác về [URL="http://www.javascriptbank.com/javascript/browser/vi/"]Trình duyệt (http://www.javascriptbank.com/vi+tag=) và Hiệu ứng trang (http://www.javascriptbank.com/javascript/browser/page-effect/vi/)
Code trình diễn ảnh (http://www.javascriptbank.com/javascript/image/slideshow/) - Các hiệu ứng chuột trong JavaScipt (http://www.javascriptbank.com/javascript/mouse/) - Game tìm 2 hình giống nhau (http://www.javascriptbank.com/concentration-smaller-index.html/vi/)
http://www.javascriptbank.com/javascript.images/browser/dynamic-html-splash-screen.jpg (http://www.javascriptbank.com/javascript/browser/page-effect/dynamic-html-splash-screen/preview/vi/)
Demo: JavaScript Đoạn giới thiệu kiểu Flash cho web (http://www.javascriptbank.com/dynamic-html-splash-screen.html/vi/)
| JavaScript Dynamic HTML Splash Screen (http://www.javascriptbank.com/dynamic-html-splash-screen.html)
Cách cài đặt
Bước 1: Đặt mã HTML bên dưới vào phần BODY
HTML
<DIV id=splashcontainer style="POSITION: absolute; WIDTH: 350px"></DIV><LAYER
id=splashcontainerns width="450"></LAYER>
<SCRIPT>
/*
Dynamic Splash Screen effect- © Dynamic Drive (www.dynamicdrive.com) Updated: 00/12/18
For full source code, installation instructions, 100's more DHTML scripts, and Terms Of Use,
Visit http://dynamicdrive.com
*/
//Specify the paths of the images to be used in the splash screen, if any.
//If none, empty out array (ie: preloadimages=new Array())
var preloadimages=new Array("bongbong.gif","bongbong.gif")
//configure delay in miliseconds between each message (default: 2 seconds)
var intervals=2000
//configure destination URL
var targetdestination="http://javascriptbank.com"
//configure messages to be displayed
//If message contains apostrophe('), backslash them (ie: "I'm fine")
var splashmessage=new Array()
var openingtags='<font face="Arial" size="4">'
splashmessage[0]='<img src="bongbong.gif"> JavaScriptBank.com <img src="bongbong.gif">'
splashmessage[1]='Bank of free JavaScript'
splashmessage[2]='over 2000+ free JavaScript code'
splashmessage[3]='please wait...'
var closingtags='</font>'
//Do not edit below this line (besides HTML code at the very bottom)
var i=0
var ns4=document.layers?1:0
var ie4=document.all?1:0
var ns6=document.getElementById&&!document.all?1:0
var theimages=new Array()
//preload images
if (document.images){
for (p=0;p<preloadimages.length;p++){
theimages[p]=new Image()
theimages[p].src=preloadimages[p]
}
}
function displaysplash(){
if (i<splashmessage.length){
sc_cross.style.visibility="hidden"
sc_cross.innerHTML='<b><center>'+openingtags+splashmessage[i]+closingtags+'</center></b>'
sc_cross.style.left=ns6?parseInt(window.pageXOffse t)+parseInt(window.innerWidth)/2-parseInt(sc_cross.style.width)/2 : document.body.scrollLeft+document.body.clientWidth/2-parseInt(sc_cross.style.width)/2
sc_cross.style.top=ns6?parseInt(window.pageYOffset )+parseInt(window.innerHeight)/2-sc_cross.offsetHeight/2 : document.body.scrollTop+document.body.clientHeight/2-sc_cross.offsetHeight/2
sc_cross.style.visibility="visible"
i++
}
else{
window.location=targetdestination
return
}
setTimeout("displaysplash()",intervals)
}
function displaysplash_ns(){
if (i<splashmessage.length){
sc_ns.visibility="hide"
sc_ns.document.write('<b>'+openingtags+splashmessage[i]+closingtags+'</b>')
sc_ns.document.close()
sc_ns.left=pageXOffset+window.innerWidth/2-sc_ns.document.width/2
sc_ns.top=pageYOffset+window.innerHeight/2-sc_ns.document.height/2
sc_ns.visibility="show"
i++
}
else{
window.location=targetdestination
return
}
setTimeout("displaysplash_ns()",intervals)
}
function positionsplashcontainer(){
if (ie4||ns6){
sc_cross=ns6?document.getElementById("splashcontainer"):document.all.splashcontainer
displaysplash()
}
else if (ns4){
sc_ns=document.splashcontainerns
sc_ns.visibility="show"
displaysplash_ns()
}
else
window.location=targetdestination
}
window.onload=positionsplashcontainer
</SCRIPT>
Bạn có thể xem các mã tương tự bên dưới
- Đoạn giới thiệu tuyệt vời với Flash và JavaScript (http://www.javascriptbank.com/tiptop-intro-along-with-flash-and-javascript.html/vi/)
- Đoạn giới thiệu mở đầu kiểu chớp giật (http://www.javascriptbank.com/flashy-dhtml-scroller.html/vi/)
- Đoạn giới thiệu cho web 2 (http://www.javascriptbank.com/document-wipes-effect.html/vi/)
Một vài nhãn tương tự: đoạn giới thiệu (http://www.javascriptbank.com/vi+tag=đoạn giới thiệu), giới thiệu (http://www.javascriptbank.com/vi+tag=giới thiệu), kiểu Flash (http://www.javascriptbank.com/vi+tag=kiểu Flash), Flash (http://www.javascriptbank.com/vi+tag=Flash), hiển thị (http://www.javascriptbank.com/vi+tag=hiển thị), chức năng (http://www.javascriptbank.com/vi+tag=chức năng), Skip intro (http://www.javascriptbank.com/vi+tag=Skip intro), [/URL]
Bạn có thể xem thêm nhiều JavaScript khác về [URL="http://www.javascriptbank.com/javascript/browser/vi/"]Trình duyệt (http://www.javascriptbank.com/vi+tag=) và Hiệu ứng trang (http://www.javascriptbank.com/javascript/browser/page-effect/vi/)
Code trình diễn ảnh (http://www.javascriptbank.com/javascript/image/slideshow/) - Các hiệu ứng chuột trong JavaScipt (http://www.javascriptbank.com/javascript/mouse/) - Game tìm 2 hình giống nhau (http://www.javascriptbank.com/concentration-smaller-index.html/vi/)