ctrl+c and ctrl + v just do it
<HTML XMLNS:SITEINFO>
<HEAD>
<TITLE>
</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<STYLE>
SITEINFO\:FAVORITES
{
BEHAVIOR: url('#default#userData')"
}
</STYLE>
<SITEINFO:FAVORITES id=siteFavorites>
</SITEINFO:FAVORITES>
<SCRIPT>
function AddFavorite(sURL, sTitle)
{
siteFavorites.load("favorites")
var oXMLDoc=siteFavorites.XMLDocument;
var oNode=oXMLDoc.createNode(1,"SITEINFO", "");
var oURLNode=oXMLDoc.createNode(1,"URL", "");
var oTitleNode=oXMLDoc.createNode(1,"TITLE", "");
oURLNode.text=sURL;
oTitleNode.text = sTitle
oNode.insertBefore(oURLNode,null)
oNode.insertBefore(oTitleNode,null)
oXMLDoc.documentElement.insertBefore(oNode, null);
siteFavorites.save("favorites")
}
function RawFavorites()
{
siteFavorites.load("favorites")
return siteFavorites.XMLDocument.documentElement.xml
}
function ListFavorites()
{
siteFavorites.load("favorites")
var oXMLDoc = siteFavorites.XMLDocument.documentElement
var wList = window.open("","fav","width=300,height=200,top=0,left=0,scrollbars=yes")
wList.document.open()
wList.document.write("<TITLE>我喜爱的站点</TITLE>")
wList.document.write("<BASE TARGET=\"_blank\">")
for (var i=0;i<oXMLDoc.childNodes.length;i++)
{
with (wList.document)
{
write("<A HREF=\"" + oXMLDoc.childNodes[i].childNodes[0].text + "\">")
write(oXMLDoc.childNodes[i].childNodes[1].text)
write("</A><BR>")
}
}
wList.document.close()
}
</SCRIPT>
</HEAD>
<BODY>
<p>请在您喜爱的站点上点击按钮:<br>
<input onClick='AddFavorite("http://www.yahoo.com.cn/","yahoo中国")' type=button value="yahoo中国"><br>
<input onClick='AddFavorite("http://lucky.myrice.com","【孟宪会之精彩世界】")' type=button value="【孟宪会之精彩世界】"><br>
<input onClick='AddFavorite("http://www.sina.com.cn","新浪网")' type=button value="新浪网"><br>
<input onClick='AddFavorite("http://www.21cn.com/","21cn.com")' type=button value="21cn.com"><br><br><br>
<input onClick=ListFavorites() type=button value="列出你喜欢的站点"><br><br><br>
<input onClick="output.value = RawFavorites()" type=button value="刷新收藏列表源文件"><br>
<textarea name=output rows=15 cols=40></textarea>
</BODY>
</HTML>