묻고답하기
page_full_width" class="col-xs-12" |cond="$__Context->page_full_width">
.js 파일안에서 링크를 열려고 합니다.
2002.12.20 02:26
밑의 메뉴js파일 인데요..
서브메뉴에 링크를 시킬려고 합니다. 새창여는 스크립트를 이용해서요
+++++++이거 이용해서+++
<script language="JavaScript">
<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}
//-->
</script>
++++++++++++++++
+++++++++++++++
<a href="#" onClick="MM_openBrWindow('../../gaide/gaide.htm','','width=305,
height=250')">홈페이지</a>
++++++++++++++++++++
이것저것 해봐도 아에 화면이 안나오거나...
링크가 되질않아요.
서브메뉴 클릭시 새창으로 띄우고 싶어요...
도와 주세요..
새 대통령이 나왔네요...
항상 기대만큼 실망시키질 않는 대통령이 됐으면...
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
table_height = 20; // 테이블 높이를 정한다.
xmenu = new Array;
xsubmenu = new Array;
//타이틀 제목을 써준다
xmenu[0] = '홈페이지';
xmenu[1] = '스크립트';
xmenu[2] = '애플릿';
xmenu[3] = '컴퓨터';
xmenu[4] = '윈도우';
xmenu[5] = '공부방';
xmenu[6] = '음악방';
//기본값을 위해 해당 메뉴만큼 null값을 채워준다
xsubmenu[0] = ''
xsubmenu[1] = ''
xsubmenu[2] = ''
xsubmenu[3] = ''
xsubmenu[4] = ''
xsubmenu[5] = ''
xsubmenu[6] = ''
xsubmenu[0] += '<A HREF="#" CLASS=menudyn3>aaa</a>'; <++++++++++여기 어떻게 고쳐요?
xsubmenu[1] += '<A HREF="#" CLASS=menudyn3>스크립트</A>';
xsubmenu[1] += ' <FONT COLOR=#FFFFFF>|</FONT> '
xsubmenu[1] += '<A HREF="#" CLASS=menudyn3>애플릿</A>';
xsubmenu[1] += ' <FONT COLOR=#FFFFFF>|</FONT> '
xsubmenu[1] += '<A HREF="#" CLASS=menudyn3>컴퓨터</A>';
xsubmenu[1] += ' <FONT COLOR=#FFFFFF>|</FONT> '
xsubmenu[1] += '<A HREF="#" CLASS=menudyn3>윈도우</A>';
xsubmenu[2] += '<A HREF="#" CLASS=menudyn3>메뉴넣기</A>';
xsubmenu[2] += ' <FONT COLOR=#FFFFFF>|</FONT> '
xsubmenu[2] += '<A HREF="#" CLASS=menudyn3>메뉴넣기</A>';
xsubmenu[2] += ' <FONT COLOR=#FFFFFF>|</FONT> '
xsubmenu[2] += '<A HREF="#" CLASS=menudyn3>메뉴넣기</A>';
xsubmenu[2] += ' <FONT COLOR=#FFFFFF>|</FONT> '
xsubmenu[2] += '<A HREF="#" CLASS=menudyn3>메뉴넣기</A>';
xsubmenu[3] += '<A HREF="#" CLASS=menudyn3>하드웨어</A>';
xsubmenu[3] += ' <FONT COLOR=#FFFFFF>|</FONT> '
xsubmenu[3] += '<A HREF="#" CLASS=menudyn3>소프트웨어</A>';
xsubmenu[4] += '<A HREF="#" CLASS=menudyn3>질문과 답변</A>';
xsubmenu[4] += ' <FONT COLOR=#FFFFFF>|</FONT> '
xsubmenu[4] += '<A HREF="#" CLASS=menudyn3>윈도우 버그</A>';
xsubmenu[4] += ' <FONT COLOR=#FFFFFF>|</FONT> '
xsubmenu[4] += '<A HREF="#" CLASS=menudyn3>윈도우 강좌</A>';
xsubmenu[4] += ' <FONT COLOR=#FFFFFF>|</FONT> '
xsubmenu[4] += '<A HREF="#" CLASS=menudyn3>윈도우 사용기</A>';
xsubmenu[4] += ' <FONT COLOR=#FFFFFF>|</FONT> '
xsubmenu[4] += '<A HREF="#" CLASS=menudyn3>윈도우 스샷</A>';
xsubmenu[5] += '<A HREF="#" CLASS=menudyn3>사과향기</A>';
xsubmenu[5] += ' <FONT COLOR=#FFFFFF>|</FONT> '
xsubmenu[5] += '<A HREF="#" CLASS=menudyn3>FreeBSD</A>';
xsubmenu[5] += ' <FONT COLOR=#FFFFFF>|</FONT> '
xsubmenu[5] += '<A HREF="#" CLASS=menudyn3>PHP + MySql</A>';
xsubmenu[5] += ' <FONT COLOR=#FFFFFF>|</FONT> '
xsubmenu[5] += '<A HREF="#" CLASS=menudyn3>E365</A>';
xsubmenu[6] += '<A HREF="#" CLASS=menudyn3>메뉴넣기</A>';
xsubmenu[6] += ' <FONT COLOR=#FFFFFF>|</FONT> '
xsubmenu[6] += '<A HREF="#" CLASS=menudyn3>메뉴넣기</A>';
//메뉴에 스타일 시트 적용
document.write('<STYLE TYPE="text/css">nA.menudyn3 {color:#FFFFFF; text-decoration:none;}nA:hover.menudyn3 {color:#FFFFFF;text-decoration:none;}n</STYLE>');
// 테이블 시작
document.write('<TABLE CELLPADDING=0 CELLSPACING=0 BORDER=0 WIDTH='+(xsubmenu.length*100)+' BGCOLOR=#000000> <TR><TD><TABLE CELLPADDING=2 CELLSPACING=1 BORDER=0 WIDTH=100%> <TR>');
for(i=0;i<xsubmenu.length;i++)
{
document.write('<TD BGCOLOR=#006699 onMouseOver="javascript:colorIt(this);MajMenu('+i+')" ALIGN=center ID=td'+i+'><FONT SIZE=-1 FACE="돋움"><B><A HREF="#" onClick="return(false)" onMouseOver="MajMenu('+i+')" CLASS=menudyn3>'+xmenu[i]+'</A></B></FONT></TD>');
}
document.write('</TR> <TR> <TD COLSPAN='+(xsubmenu.length)+' BGCOLOR=#6699CC HEIGHT='+table_height+' VALIGN=top><ilayer id="dynamenu31" width=100% height='+table_height+'><layer id="dynamenu32" width=100% height='+table_height+'><div id="dynamenu33"> </div></layer></ilayer></TD> </TR></TABLE></TD></TR></TABLE>');
// 테이블 끝
// 테이블 백그라운드 컬러 시작
function colorIt(tditem)
{
if(document.all)
{ // 메뉴가 늘어나면 추가한다
document.all.td0.style.background='#006699';
document.all.td1.style.background='#006699';
document.all.td2.style.background='#006699';
document.all.td3.style.background='#006699';
document.all.td4.style.background='#006699';
document.all.td5.style.background='#006699';
document.all.td6.style.background='#006699';
tditem.style.background='#6699CC';
}
else if(document.getElementById)
{ // 메뉴가 늘어나면 추가한다
document.getElementById("td0").style.background='#006699';
document.getElementById("td1").style.background='#006699';
document.getElementById("td2").style.background='#006699';
document.getElementById("td3").style.background='#006699';
document.getElementById("td4").style.background='#006699';
document.getElementById("td5").style.background='#006699';
document.getElementById("td6").style.background='#006699';
tditem.style.background='#6699CC';
}
}
//테이블 백그라운 컬러 끝
function MajMenu(menu) //타이틀 메뉴를 제어한다
{
which = xsubmenu[menu];
if (document.layers){
document.dynamenu31.document.dynamenu32.document.write('<FONT SIZE=-1 FACE="돋움"><B>'+which+'</B></FONT>')
document.dynamenu31.document.dynamenu32.document.close()
}
else if (document.getElementById) // 서브메뉴를 제어한다
{
document.getElementById("dynamenu33").innerHTML = '<CENTER><FONT SIZE=-1 FACE="돋움"><B>'+which+'</B></FONT></CENTER>';
}
else if (document.all){
dynamenu33.innerHTML=' '
dynamenu33.innerHTML='<FONT SIZE=-1 FACE="돋움"><B>'+which+'</B></FONT>';
}
}
if (document.getElementById)
colorIt(document.getElementById("td0"));
else if (document.all){
colorIt(document.all.td0);
}
MajMenu(0);
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
서브메뉴에 링크를 시킬려고 합니다. 새창여는 스크립트를 이용해서요
+++++++이거 이용해서+++
<script language="JavaScript">
<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}
//-->
</script>
++++++++++++++++
+++++++++++++++
<a href="#" onClick="MM_openBrWindow('../../gaide/gaide.htm','','width=305,
height=250')">홈페이지</a>
++++++++++++++++++++
이것저것 해봐도 아에 화면이 안나오거나...
링크가 되질않아요.
서브메뉴 클릭시 새창으로 띄우고 싶어요...
도와 주세요..
새 대통령이 나왔네요...
항상 기대만큼 실망시키질 않는 대통령이 됐으면...
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
table_height = 20; // 테이블 높이를 정한다.
xmenu = new Array;
xsubmenu = new Array;
//타이틀 제목을 써준다
xmenu[0] = '홈페이지';
xmenu[1] = '스크립트';
xmenu[2] = '애플릿';
xmenu[3] = '컴퓨터';
xmenu[4] = '윈도우';
xmenu[5] = '공부방';
xmenu[6] = '음악방';
//기본값을 위해 해당 메뉴만큼 null값을 채워준다
xsubmenu[0] = ''
xsubmenu[1] = ''
xsubmenu[2] = ''
xsubmenu[3] = ''
xsubmenu[4] = ''
xsubmenu[5] = ''
xsubmenu[6] = ''
xsubmenu[0] += '<A HREF="#" CLASS=menudyn3>aaa</a>'; <++++++++++여기 어떻게 고쳐요?
xsubmenu[1] += '<A HREF="#" CLASS=menudyn3>스크립트</A>';
xsubmenu[1] += ' <FONT COLOR=#FFFFFF>|</FONT> '
xsubmenu[1] += '<A HREF="#" CLASS=menudyn3>애플릿</A>';
xsubmenu[1] += ' <FONT COLOR=#FFFFFF>|</FONT> '
xsubmenu[1] += '<A HREF="#" CLASS=menudyn3>컴퓨터</A>';
xsubmenu[1] += ' <FONT COLOR=#FFFFFF>|</FONT> '
xsubmenu[1] += '<A HREF="#" CLASS=menudyn3>윈도우</A>';
xsubmenu[2] += '<A HREF="#" CLASS=menudyn3>메뉴넣기</A>';
xsubmenu[2] += ' <FONT COLOR=#FFFFFF>|</FONT> '
xsubmenu[2] += '<A HREF="#" CLASS=menudyn3>메뉴넣기</A>';
xsubmenu[2] += ' <FONT COLOR=#FFFFFF>|</FONT> '
xsubmenu[2] += '<A HREF="#" CLASS=menudyn3>메뉴넣기</A>';
xsubmenu[2] += ' <FONT COLOR=#FFFFFF>|</FONT> '
xsubmenu[2] += '<A HREF="#" CLASS=menudyn3>메뉴넣기</A>';
xsubmenu[3] += '<A HREF="#" CLASS=menudyn3>하드웨어</A>';
xsubmenu[3] += ' <FONT COLOR=#FFFFFF>|</FONT> '
xsubmenu[3] += '<A HREF="#" CLASS=menudyn3>소프트웨어</A>';
xsubmenu[4] += '<A HREF="#" CLASS=menudyn3>질문과 답변</A>';
xsubmenu[4] += ' <FONT COLOR=#FFFFFF>|</FONT> '
xsubmenu[4] += '<A HREF="#" CLASS=menudyn3>윈도우 버그</A>';
xsubmenu[4] += ' <FONT COLOR=#FFFFFF>|</FONT> '
xsubmenu[4] += '<A HREF="#" CLASS=menudyn3>윈도우 강좌</A>';
xsubmenu[4] += ' <FONT COLOR=#FFFFFF>|</FONT> '
xsubmenu[4] += '<A HREF="#" CLASS=menudyn3>윈도우 사용기</A>';
xsubmenu[4] += ' <FONT COLOR=#FFFFFF>|</FONT> '
xsubmenu[4] += '<A HREF="#" CLASS=menudyn3>윈도우 스샷</A>';
xsubmenu[5] += '<A HREF="#" CLASS=menudyn3>사과향기</A>';
xsubmenu[5] += ' <FONT COLOR=#FFFFFF>|</FONT> '
xsubmenu[5] += '<A HREF="#" CLASS=menudyn3>FreeBSD</A>';
xsubmenu[5] += ' <FONT COLOR=#FFFFFF>|</FONT> '
xsubmenu[5] += '<A HREF="#" CLASS=menudyn3>PHP + MySql</A>';
xsubmenu[5] += ' <FONT COLOR=#FFFFFF>|</FONT> '
xsubmenu[5] += '<A HREF="#" CLASS=menudyn3>E365</A>';
xsubmenu[6] += '<A HREF="#" CLASS=menudyn3>메뉴넣기</A>';
xsubmenu[6] += ' <FONT COLOR=#FFFFFF>|</FONT> '
xsubmenu[6] += '<A HREF="#" CLASS=menudyn3>메뉴넣기</A>';
//메뉴에 스타일 시트 적용
document.write('<STYLE TYPE="text/css">nA.menudyn3 {color:#FFFFFF; text-decoration:none;}nA:hover.menudyn3 {color:#FFFFFF;text-decoration:none;}n</STYLE>');
// 테이블 시작
document.write('<TABLE CELLPADDING=0 CELLSPACING=0 BORDER=0 WIDTH='+(xsubmenu.length*100)+' BGCOLOR=#000000> <TR><TD><TABLE CELLPADDING=2 CELLSPACING=1 BORDER=0 WIDTH=100%> <TR>');
for(i=0;i<xsubmenu.length;i++)
{
document.write('<TD BGCOLOR=#006699 onMouseOver="javascript:colorIt(this);MajMenu('+i+')" ALIGN=center ID=td'+i+'><FONT SIZE=-1 FACE="돋움"><B><A HREF="#" onClick="return(false)" onMouseOver="MajMenu('+i+')" CLASS=menudyn3>'+xmenu[i]+'</A></B></FONT></TD>');
}
document.write('</TR> <TR> <TD COLSPAN='+(xsubmenu.length)+' BGCOLOR=#6699CC HEIGHT='+table_height+' VALIGN=top><ilayer id="dynamenu31" width=100% height='+table_height+'><layer id="dynamenu32" width=100% height='+table_height+'><div id="dynamenu33"> </div></layer></ilayer></TD> </TR></TABLE></TD></TR></TABLE>');
// 테이블 끝
// 테이블 백그라운드 컬러 시작
function colorIt(tditem)
{
if(document.all)
{ // 메뉴가 늘어나면 추가한다
document.all.td0.style.background='#006699';
document.all.td1.style.background='#006699';
document.all.td2.style.background='#006699';
document.all.td3.style.background='#006699';
document.all.td4.style.background='#006699';
document.all.td5.style.background='#006699';
document.all.td6.style.background='#006699';
tditem.style.background='#6699CC';
}
else if(document.getElementById)
{ // 메뉴가 늘어나면 추가한다
document.getElementById("td0").style.background='#006699';
document.getElementById("td1").style.background='#006699';
document.getElementById("td2").style.background='#006699';
document.getElementById("td3").style.background='#006699';
document.getElementById("td4").style.background='#006699';
document.getElementById("td5").style.background='#006699';
document.getElementById("td6").style.background='#006699';
tditem.style.background='#6699CC';
}
}
//테이블 백그라운 컬러 끝
function MajMenu(menu) //타이틀 메뉴를 제어한다
{
which = xsubmenu[menu];
if (document.layers){
document.dynamenu31.document.dynamenu32.document.write('<FONT SIZE=-1 FACE="돋움"><B>'+which+'</B></FONT>')
document.dynamenu31.document.dynamenu32.document.close()
}
else if (document.getElementById) // 서브메뉴를 제어한다
{
document.getElementById("dynamenu33").innerHTML = '<CENTER><FONT SIZE=-1 FACE="돋움"><B>'+which+'</B></FONT></CENTER>';
}
else if (document.all){
dynamenu33.innerHTML=' '
dynamenu33.innerHTML='<FONT SIZE=-1 FACE="돋움"><B>'+which+'</B></FONT>';
}
}
if (document.getElementById)
colorIt(document.getElementById("td0"));
else if (document.all){
colorIt(document.all.td0);
}
MajMenu(0);
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++