You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
DS7/DSWeb/js/bookmark.js

39 lines
1.0 KiB
JavaScript

3 years ago
function bookmark()
{
if(getCookie("bookmark")!="yes")
{
//setCookie("bookmark","yes",1);window.external.AddFavorite('http://hmw028167.chinaw3.com/LoginEB.aspx','衍六客户运价查询');
setCookie("bookmark","yes",1);window.external.AddToFavoritesBar('http://hmw028167.chinaw3.com','衍六客户运价查询');
}
}
function setCookie(name,value,days)
{
var exp=new Date();
exp.setTime(exp.getTime() + days*24*60*60*1000);
var arr=document.cookie.match(new RegExp("(^| )"+name+"=([^;]*)(;|$)"));
document.cookie=name+"="+escape(value)+";expires="+exp.toGMTString();
}
function getCookie(name)
{
var arr=document.cookie.match(new RegExp("(^| )"+name+"=([^;]*)(;|$)"));
if(arr!=null)
{
return unescape(arr[2]);
return null;
}
}
function delCookie(name)
{
var exp=new Date();
exp.setTime(exp.getTime()-1);
var cval=getCookie(name);
if(cval!=null)
{
document.cookie=name+"="+cval+";expires="+exp.toGMTString();
}
}