JS 코드
즐겨찾기에 추가 <! 공용 DOCTYPE HTML "-//W3C//DTD XHTML 1.0 전환 / / 엉" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd
< html xmlns = "http://www.jzread.com/1999/xhtml"
< 머리 & gt
< 메타 http-equiv = " 콘텐츠 형식의 "콘텐츠 =" text/html; charset = gb2312 "/ & gt
< 제목 > js 코드에 즐겨찾기에 추가 < / 제목 & gt
< 스크립트 언어 =" 자바 "
/ /
함수 Addfavorite (site_url, site_name) 즐겨찾기에 추가
{
var the_pagetitle = site_name;
var the_ Pageurl = site_url;
경우 (the_pageurl = = ") {
the_pageurl=window.location.href;
}
경우 (the_pagetitle = = "")
{& nbsp
the_pagetitle=document.title
/ / Window.external.addFavorite (The_pageurl, the_pagetitle);
경우 (window.sidebar) {
window.sidebar.addpanel (The_pagetitle, the_pageurl, "");
& nbsp} 다른 면 (document.all) {
//alert (window.external);
window.external.addfavorite (The_pageurl, the_pagetitle);
//window.external.addfavorite ('http://www.jzread.com', '내 사이트 이름을');
& nbsp} 다른 if (Window.opera & & window.print) {
반환 진정한;
}
} < / 스크립트 & gt
< / 헤드 >
< 바디 & gt
< a href = "javascript:void (0)" onclick = "Javascript:addfavorite ('http://www.jzread.com') "건설 역 네트워크 교육"); > 즐겨찾기에 추가 < / a & gt
< / 바디 >
< / html >