function
FormatDate(inputdate){ //格式化日期
return inputdate.getFullYear() + " - " + (inputdate.getMonth() + 1 ) + " - " + inputdate.getDate()
}
return inputdate.getFullYear() + " - " + (inputdate.getMonth() + 1 ) + " - " + inputdate.getDate()
}
toFixed 格式化小数
function
addfavorite(url,text){
if (document.all){
window.external.addFavorite(url,text)
}
else {
if (window.sidebar) window.sidebar.addPanel(text,url, "" )
}
return false ;
}
if (document.all){
window.external.addFavorite(url,text)
}
else {
if (window.sidebar) window.sidebar.addPanel(text,url, "" )
}
return false ;
}
添加收藏夹 注意:url只能是本网站域名的,不然会遇到没有权限错误,不支持chrome,chrome目前还没有什么直接的办法加入收藏。 this.title,this.href
字符串比较方法 localeCompare a.localeCompare(b) 返回 –1、0 或 +1,取决于系统中缺省区域设置的排序