웹마스터 팁

미리보기 : http://myhome.hanafos.com/~bmw3000cc/good_script.htm

<head> 부분에 삽입 하는 태그
<style>
v:* { behavior: url(#default#VML); }
</style>

<body>아랫 부분에 삽입하는 스크립트 태그

<script>
// 변환돼는 메시지
var message=new Array("Hi All user", "My Web font mania", "My homepage webfont home", "You free webfont downlaod", "Go Go My homepage")

// 라인색상 페이지가 넘어갈때 마다 변환 됩니다. 순서대로
var outlinecolor=new Array("white", "black","red")

// 그라데이션 아래 색상
var fillcolor1=new Array("blue", "green", "white", "green")

// 그라데이션 위쪽 색상
var fillcolor2=new Array("yellow", "olive", "black", "black")

// 글자가 변환돼기전에 원을 그리는 문자 (사용자가 임의로 조작가능)
var circlemark=new Array("-")

// 라인 두께
var strkweight=2

// 텍스트 변환이 끝난뒤 정죄돼 있는 시간 (초단위)
var pause=2

// 불투명도를 조절하는 부분
var strengthopacity="60%"

// 반원의 대비 0.1-1 까지 입력 가능
var circlesize=0.6

///// 건들지 마시오 //////
var outerwidth=document.body.clientWidth
var outerheight=document.body.clientHeight

var innerwidth=Math.floor(circlesize*outerwidth)
var innerheight=Math.floor(circlesize*outerheight)

var posleft=(outerwidth-innerwidth)/2
var postop=(outerheight-innerheight)/2+50

var path=new Array()
var i_message=0
var i_outlinecolor=0
var i_fillcolor1=0
var i_fillcolor2=0
var i_messagelength=0
var longestmessage=0
pause*=1000

var ie=document.getElementById&&document.all?1:0

for (i=0;i<=message.length-1;i++) {
        if (message[i].length>longestmessage) {
                longestmessage=message[i].length
        }
        longestmessage+=4
}

for (i=0;i<=message.length-1;i++) {
        var emptyspace=""
        var i_emptyspace=(longestmessage-message[i].length)/2
        for (ii=0;ii<=i_emptyspace;ii++) {
                emptyspace+=circlemark
        }
        message[i]=emptyspace+" "+message[i]+" "+emptyspace
}

function changeform() {
        if (i_outlinecolor >= outlinecolor.length) {i_outlinecolor=0}
        if (i_fillcolor1 >= fillcolor1.length) {i_fillcolor1=0}
        if (i_fillcolor2 >= fillcolor2.length) {i_fillcolor2=0}
        document.getElementById('strokeid').color=outlinecolor[i_outlinecolor]
        document.getElementById('fillid').color=fillcolor1[i_fillcolor1]
        document.getElementById('fillid').color2=fillcolor2[i_fillcolor2]
        if (i_message < message.length) {tick()}
        else {document.getElementById('textpathid').string=""}
}

function tick() {
        if (i_messagelength <= message[i_message].length) {
                var messagestringend=""
                var messagestring=message[i_message].substring(0, i_messagelength)+messagestringend
                document.getElementById('textpathid'+ ').string=messagestring
                var timer=setTimeout("tick()",50)
                i_messagelength++
        }
        else {
                clearTimeout(timer)
                i_messagelength=0
                i_message++
                i_outlinecolor++        
                i_fillcolor1++        
                i_fillcolor2++        
                var timer=setTimeout("changeform()",pause)
        }
        
}

if (ie) {
        document.write('<div id="roofid" style="position:absolute;left:0px;top:0px;width:'+outerwidth+'px;height:'+outerheight+'px;overflow:hidden;">')
        document.write('<v:oval id="tc" style="position:absolute;top:'+postop+';left:'+posleft+';width:'+innerwidth+';height:'+innerheight+'">')
        document.write('<v:shadow on="t" opacity="'+strengthopacity+'"/>')
        document.write('<v:stroke id="strokeid" weight="'+strkweight+'pt" color="blue"/>')
        document.write('<v:fill id="fillid" on="True" color="'+fillcolor1[0]+'" color2="'+fillcolor2[0]+'" opacity="'+strengthopacity+'" opacity2="'+strengthopacity+'" type="gradient"/>')
        document.write('<v:path textpathok="t"/>')
        document.write('<v:textpath id="textpathid" on="t" id="mytp" style="font-family:'Arial Black'; " fitpath="t" string=""/>')
        document.write('</v:oval>')
        window.onload=changeform
}
</script>
제목 글쓴이 날짜
페이지 내에 주소창 달기 [1] piasol 2004.02.09
앞,뒤,새로고침 만들기 [2] piasol 2004.02.01
[초간단 자바스크립트!] 자바로 홈페이지를부드럽게!!(1) [4] ∑Ztxy 2004.01.27
[초간단 자바스크립트!] 자바로 로그인폼 만들기 [3] ∑Ztxy 2004.01.26
[초간단 자바스크립트!] 튀어나오는 글자..-_-;; ∑Ztxy 2004.01.18
Thinking In Java 2nd Edition file n25 2004.01.14
[초간단 자바스크립트!] 홈페이지접속 시간,날짜 표시기 [3] ∑Ztxy 2004.01.09
들어갈때 시작페이지 설정하는거... [2] 쉿!비밀 2003.12.17
오른버튼 누를때 메뉴 뜨게하기(깔끔버전) [5] file 2003.12.09
익스플로러에서 인쇄 누르면 페이지 이동.... [3] 조한웅 2003.11.28
팝업공지창 다시 안뜨게 하는 소스[날짜지정가능] [17] lemin 2003.11.20
심플한 원단위를 콤마로 나타내주기 [2] zentoo.com 2003.11.11
정말 멋있는 글자 변환 스크립트 [12] sythesis 2003.11.07
마우스 이벤트 발생시 문서 상,하단으로 이동 [3] RedEye(kaist) 2003.10.30
클릭하면 홈페이지를 시작페이지로 하는 소스... [7] 젤군 2003.10.28
[초간단 자바스크립트!] 날짜 카운터! 커플홈에 강추!! [15] ∑Ztxy 2003.10.08
[초간단 자바스크립트!] 홈페이지에 FTP 폼 넣기?! [10] ∑Ztxy 2003.09.29
플레쉬 메뉴를 표방한..=ㅁ= 자바스크립트의 수작 버튼 밑으로 스크롤 되는 아이콘입니다. [47] beMax 2003.09.14
frame으로 홈페이지 구성시 한쪽 페이지는 유동성있는 파일 대입법(?) monozzang 2003.09.02
경우에 따라 공지가 새창에서도 보여야 하고, 일반 페이지에서도 보여야 할때 조은하루 2003.08.22