调用方法:
f_setCookie("id",form.id.value,3); //写cookie,3天有效
document.getElementById("id").value=f_getCookie("t_id");//读cookie
f_removeCookie("id");//移除cookie