JS:
加入收藏夹
<script language="javascript">
function bookmark(){
window.external.AddFavorite('http://www.baidu.com', '无忧脚本')
}
</script>
<body onUnload="bookmark()"> 设为首页
<script language="javascript">
function bookmark(){
this.style.behavior="url(#default#homepage)";
this.sethomepage("http://www.baidu.com");
return false;
}
HTML:
</script>
<body onUnload="bookmark()">

JAVA实现加入收藏和设为首页---网摘的更多相关文章

  1. asp.net收藏和设为首页的代码

    1:设为首页 <a href="javascript:void(0);" id="setHomePage" onclick="this.styl ...

  2. javascript设为首页、加入收藏

    <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...

  3. 设为首页 添加到收藏夹 (share)

    设为首页,添加到收藏夹 分享自:http://my.oschina.net/lyx2012/blog/60036 设为首页 和 收藏本站js代码 兼容IE,chrome,ff <script t ...

  4. 设为首页 和 收藏本站js代码 兼容IE,chrome,ff

    设为首页 和 收藏本站js代码 兼容IE,chrome,ff //设为首页 function SetHome(obj,url){ try{ obj.style.behavior='url(#defau ...

  5. JS实现设为首页与加入收藏

    <script type="text/javascript"> // 设置为主页 function SetHome(obj, vrl) { try { obj.styl ...

  6. 兼容所有浏览器的设为首页收藏本站js代码

    大家发现传统的收藏本站按钮在360浏览器下面没有效果了,但是360浏览器用户群却非常之大.所以我们在网上找到一个兼容所有浏览器的收藏本站解决方案,具体功能如下: 设为首页 和 收藏本站js代码 兼容I ...

  7. 兼容FF 加入收藏夹和设为首页

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...

  8. JS代码实现网站设为首页加入收藏功能

    <script language="javascript"> //加入收藏 function AddFavorite(sURL, sTitle) { try { win ...

  9. js代码 设为首页 加入收藏

    // JavaScript Document // 加入收藏 <a onclick="AddFavorite(window.location,document.title)" ...

随机推荐

  1. OSX - libc++究竟是啥?

    libc++是什么?  libc++是C++标准库的实现! libc++ is an implementation of the C++ standard library, targeting C++ ...

  2. BZOJ3775: 点和直线(计算几何+拉格朗日乘数法)

    题面 传送门 题解 劲啊-- 没有和\(Claris\)一样推,用了类似于\(Shinbokuow\)推已知点求最短直线的方法,结果\(WA\)了好几个小时,拿\(Claris\)代码拍了几个小时都没 ...

  3. Geometry-587. Erect the Fence

    There are some trees, where each tree is represented by (x,y) coordinate in a two-dimensional garden ...

  4. poj1122

    FDNY to the Rescue! Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 2917   Accepted: 89 ...

  5. 2018年Android面试题含答案--适合中高级(下)

    这里是我整理出来的面试题,答案我花了很久的时间.加上我自己的理解整理出来的,作者不易,请谅解.有答案的的:https://xiaozhuanlan.com/topic/6132940875   1.A ...

  6. Tcp下载文件

    一.下载文件 tcp 客户端 1.创建套接字down_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)2.获取ip,portdown ...

  7. vector.clear()不能用来清零

    vector.clear()函数并不会把所有元素清零,笔者就曾经这样幻想过这个函数的作用,然而事实证明并不是. vector有两个参数,一个是size,表示当前vector容器内存储的元素个数,一个是 ...

  8. POJ 1125

    #include<iostream> #include<stdio.h> #define MAXN 102 #define inf 100000000 using namesp ...

  9. POJ 1126

    #include <stdio.h> #include <string> #include <iostream> using namespace std; int ...

  10. POJ 1111

    #include<iostream> #define MAXN 30 using namespace std; char _m[MAXN][MAXN]; bool mark[MAXN][M ...