[] window.external.addFavoriteお気に入りを追加するためのヒント



Window External Addfavorite Some Tips



[url] http://blog.csdn.net/swort_177/archive/2009/04/23/4103755.aspx [/ url]



function AddFavorite(sURL, sTitle)
{
try
{
window.external.addFavorite(sURL, sTitle)
}
catch (e)
{
try
{
window.sidebar.addPanel(sTitle, sURL, '')
}
catch (e)
{
Alert ('Failed to add to the collection, you have to add it manually.')
}
}
}




お気に入りに追加

お気に入りに追加するために使用されます

Webページを閉じると、ポップアップホームページのダイアログコードは次のようになります。
onunload = 'iehomepage.style.behavior =’ url(#default#homepage) ’if(!(iehomepage.isHomePage(’

htto // www.csdn.net ’)))iehomepage.setHomePage(’ htto // www.csdn.net ’)'>

Webページのポップアップを開いて、ホームページのダイアログコードを設定します。
onload = 'iehomepage.style.behavior =’ url(#default#homepage) ’if(!(iehomepage.isHomePage(’

htto // www.csdn.net ’)))iehomepage.setHomePage(’ htto // www.csdn.net ’)'>

リンクをクリックしてホームページに設定します
ホームページとして設定

マウスオーバーしてホームページとして設定
ホームページとして設定

お気に入りコードに添付:

Webページを離れるときにポップアップします

関数bookmarkit(){window.external.addFavorite( ’htto // www.csdn.net’、 'my home')}


ページが読み込まれるとポップアップします

関数bookmarkit(){window.external.addFavorite( ’htto // www.csdn.net’、 'my home')} /



右クリック

document.all.onMouseDown = new Function( 'if(event.button == 2 || event.button == 3)

window.external.addFavorite( ’htto // www.csdn.net’、 'my home')”)/


テキストをクリックしてポップアップします

関数bookmarkit(){window.external.addFavorite( ’htto // www.csdn.net’、 'my home')} /
If(document.all)document.write( ’ お気に入りに追加 ')


テキストの上にマウスを置くとポップアップします

関数bookmarkit(){window.external.addFavorite( ’htto // www.csdn.net’、 'my home')} /
If(document.all)document.write( ’ お気に入りに追加 ')