링크를 걸려고 합니다. > 그누4 질문답변

그누4 질문답변

그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기
기존 게시물은 열람만 가능합니다.

링크를 걸려고 합니다. 정보

링크를 걸려고 합니다.

본문

아래는 타이핑스크롤 한줄 최신글입니다.
최신글 제목에 링크를 걸려고 하는데, 어떻게 하면 되는가요?

아래는 소스입니다. 고수님들 알려주세요....

+++++++++++++++++++++++
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>

<script language="JavaScript1.2">
<!--

/*
Typing Scroller
Submitted by http://dynamicdrive.com
*/

//Secify scroller contents
var line=new Array()
<?  for ($i=0; $i<count($list); $i++) { ?>
line[<?=$i?>+1]="<?=$list[$i][subject]?>"
<? } ?>

<? if (count($list) == 0) { ?>line[0]="게시물이 없습니다.";<? } ?>

//Specify font size for scoller
var ts_fontsize="13px"

//--Don't edit below this line

var longestmessage=1
for (i=2;i<line.length;i++){
if (line[i].length>line[longestmessage].length)
longestmessage=i
}

//Auto set scroller width
var tscroller_width=line[longestmessage].length

lines=line.length-1 //--Number of lines

//if IE 4+ or NS6
if (document.all||document.getElementById){
document.write('<form name="bannerform">')
document.write('<input type="text" name="banner" size="100"')
document.write('  style="background:none; color: #666666; font-size: '+ts_fontsize+'; border:0px" onfocus="blur()">')
document.write('</form>')
}

temp=""
nextchar=-1;
nextline=1;
cursor="\\"
function animate(){
if (temp==line[nextline] & temp.length==line[nextline].length & nextline!=lines){
nextline++;
nextchar=-1;
document.bannerform.banner.value=temp;
temp="";
setTimeout("nextstep()",3000)}
else if (nextline==lines & temp==line[nextline] & temp.length==line[nextline].length){
nextline=1;
nextchar=-1;
document.bannerform.banner.value=temp;
temp="";
setTimeout("nextstep()",3000)}
else{
nextstep()}}

function nextstep(){

if (cursor=="\\"){
cursor="|"}
else if (cursor=="|"){
cursor="/"}
else if (cursor=="/"){
cursor="-"}
else if (cursor=="-"){
cursor="\\"}


nextchar++;
temp+=line[nextline].charAt(nextchar);
document.bannerform.banner.value=temp+cursor
setTimeout("animate()",25)}

//if IE 4+ or NS6
if (document.all||document.getElementById)
window.onload=animate
// -->
</script>
++++++++++++++++++++++
  • 복사

댓글 전체

© SIRSOFT
현재 페이지 제일 처음으로