可以参考以下代码
function addBookmark(title, url){
if (document.all)
window.external.AddFavorite(url, title);
else if (window.sidebar)
window.sidebar.addPanel(title, url, “”)
}
这段代码也很有意思
http://www.webreference.com/scripts/sidebar/6.html
SCRIPT LANGUAGE=”JavaScript”>
function addTab(tabName,tabURL,tabCURL) {
if ((window.sidebar) && (window.sidebar.addPanel)) {
try {
window.sidebar.addPanel(tabName,tabURL,tabCURL);
}
catch (e) {
alert(’An error occurred when trying to add our tab to your ‘+
‘Sidebar. This is most likely the result of a known bug ‘+
‘(see Bugzilla #97016) in some Netscape6/Mozilla versions. ‘+
‘You should be able to click the add tab link again now ‘+
‘and it should work properly.
‘+
‘If you continue to have problems, try opening your sidebar ‘+
‘first, and then click the add tab link.’);
}
} else {
alert(’Sorry, you can only add the ‘+tabName+’ tab if you are ‘+
‘running Netscape 6 or Mozilla.’);
}
}
…
但是 sidebar 并不等同于 收藏,:( 还有人推荐 cltr+d(firefox) ctrl+t(opera)
encodeURI 方法返回一个已编码的 URI。如果将编码结果传递给 decodeURI,则将返回初始的字符串。encodeURI 不对下列字符进行编码:“:”、“/”、“;”和“?”。请使用 encodeURIComponent 对这些字符进行编码。
返回统一资源标识符 (URI) 的一个已编码组件的非编码形式。
function decodeURIComponent(encodedURIString : String) : String
必选的 encodedURIString 参数是一个表示已编码的 URI 组件的值。
备注
URIComponent 是一个完整的 URI 的一部分。
如果 encodedURIString 无效,则将产生 URIError。
看到这篇文章
http://www.donews.net/nicol/archive/2004/11/13/168938.aspx
firefox 插件每次都需要重启、混乱的插件版本、稳定性差,把我烦透了… 还是用opera 8 或者 netscape 吧,firefox 的插件对应的功能几乎都有。
现在我越来越喜欢 opera 和 netscape 了…
这个句子很长,缩小浏览器窗口看看效果! 句子很长,缩小浏览器窗口看看效果!句子很长,缩小浏览器窗口看看效果! 句子很长,缩小浏览器窗口看看效果! 句子很长,缩小浏览器窗口看看效果!
[Ctrl+A 全部选择 提示:你可先修改部分代码,再按运行]
突然发现,firefox 不支持 cursor:url(…) 的写法。看到这些IE 6 or later 的新属性
http://forums.mozillazine.org/viewtopic.php?t=212516
[Ctrl+A 全部选择 提示:你可先修改部分代码,再按运行]
完整资料在:
http://msdn.microsoft.com/workshop/author/dhtml/reference/properties/cursor.asp?frame=true
BTW:明天以后这里就不能用了!节日期间改用 livejournal,每次转换新软件 新系统 都是一次痛苦的体验,大前年不管怎么说,都必须去适应!这就是IT行业的特点 - 永远去尝试新事物…
var isGecko=navigator.userAgent.indexOf(”Gecko”)>0;
var isIE=navigator.userAgent.indexOf(”MSIE”)>0;
var isSafari=navigator.userAgent.indexOf(”Safari”)>0;
var isFirefox=navigator.userAgent.indexOf(”Firefox”)>0;
var isCamino=navigator.userAgent.indexOf(”Camino”)>0;
var isMozilla=navigator.userAgent.indexOf(”Gecko/”)>0;
document.designMode 状态检测:
Just check if document.designMode is not null. That means it supports designMode. By defauly, the value will be “off” for mozilla or “inherit” for IE.
原文在:
http://www2.schmidetzki.net/WebGatePublisher/schmidetzki/html/default/webb-68zrr4.de.0