본문 바로가기

WEB_TECH/웹개발TIP

북마크 추가하는 스크립트

<SCRIPT language=JavaScript type=text/javascript>

<!--

function addToFav() { 

    if(window.sidebar){

window.sidebar.addPanel(document.title, this.location,"");

}

else{       

window.external.AddFavorite(this.location,document.title);     

}

}        

   

if(window.external) {       

document.write('<a href="javascript:addToFav()">즐겨찾기 추가</a>'); 

}

else {

document.write('<div>즐겨찾기 (Ctrl+D)</div>');

}

//--> 

</SCRIPT>

<A href="javascript:addToFav()">즐겨찾기 추가</A> 

<NOSCRIPT></NOSCRIPT>