实现jsp网站添加到收藏夹
2013-07-18 19:31
281 查看
var ctrl = (navigator.userAgent.toLowerCase()).indexOf('mac') != -1 ? 'Command/Cmd': 'CTRL';
if (document.all) {
window.external.addFavorite(location.href, document.title)
} else if (window.sidebar) {
window.sidebar.addPanel(document.title, location.href, "")
} else {
alert('您可以尝试通过快捷键' + ctrl + ' + D 加入到收藏夹~')
}
---------------------------------或者------------------------------------------------------
<a href="javascript:window.external.AddFavorite('http://www.baidu.com','百度')/>收藏</a>
if (document.all) {
window.external.addFavorite(location.href, document.title)
} else if (window.sidebar) {
window.sidebar.addPanel(document.title, location.href, "")
} else {
alert('您可以尝试通过快捷键' + ctrl + ' + D 加入到收藏夹~')
}
---------------------------------或者------------------------------------------------------
<a href="javascript:window.external.AddFavorite('http://www.baidu.com','百度')/>收藏</a>
相关文章推荐
- 网站添加到收藏夹
- 使用jsp实现网站计数的功能
- 网站页面自动跳转实现方法PHP、JSP等
- JSP+Servlet+Tomcat+Mysql实现注册、登陆、修改、添加、查看、分页实例之----密码修改
- jsp实现网站计数器
- 网站页面自动跳转实现方法PHP、JSP等
- jsp实现网站浏览过滤器(没有登录就不能访问其他网页)
- JSP +MySQL实现网站的登录与注册小案例
- Struts,MVC 的一种开放源码实现用这种servlet和JSP框架管理复杂的大型网站
- 网站子目录绑定二级域名 php虚拟主机可以通过添加个.htaccess文件实现绑定
- C# 实现向浏览器的兼容性视图列表中添加、删除网站和检查网站是否在兼容性网站列表中
- Struts,MVC 的一种开放源码实现用这种servlet和JSP框架管理复杂的大型网站
- 网站收藏夹图标 添加代码
- JSP +MySQL实现网站的登录与注册小案例
- Jsp+JavaBean+Servlet实现模拟银行账户存取款等功能的网站(实习第4-8天)
- 为网站添加图标和收藏夹图标
- JSP+Servlet+Tomcat+Mysql实现注册、登陆、修改、添加、查看、分页实例之----公共类代码
- JSP实现添加图书、修改图书以及删除图书
- JSP+Servlet+Tomcat+Mysql实现注册、登陆、修改、添加、查看、分页实例之----查询列表
- 1# JSP显示页面,模拟购物网站的实现