首页 | 代码中心 | 源码下载 | 用户管理 | 用户留言 | 导航 | 繁體
代码秀,专业程序代码提供商(源码下载,编程技术)
要完成此效果需要两个步骤 第一步:把如下代码加入到区域中 <Script> var expDays = 30; var exp = new Date(); exp.setTime(exp.getTime() + (expDays*24*60*60*1000)); var ShowCount = 0; var SwapColour; function ListToDoItems() { var NumToDoItems = GetCookie('PT_NumToDoList'); var i; var ToDoItem; if (NumToDoItems == null) { NumToDoItems = 0; } ShowCount = 0; SwapColour = 0; for (i=1; i <= NumToDoItems; i++) { ToDoItem = GetCookie('PT_ToDoItem'+i); if (ToDoItem != null) { PrintItem(ToDoItem, i); } } } function DeleteItem(Count) { DeleteCookie('PT_ToDoItem'+Count); window.location = window.location; } function PrintItem (ToDoItem, Count) { var color = ""; SwapColour = 1 - SwapColour; if (SwapColour==1) {color = "bgcolor='#cococo'"} ; ShowCount++; document.write(""+ShowCount); document.write(""+ToDoItem); document.write(""+"Delete"); } function AddItem() { var NumToDoItems = GetCookie('PT_NumToDoList'); var i; var ToDoItem; if (NumToDoItems == null) { NumToDoItems = 0; } ToDoItem = prompt("Enter new item"); if ((ToDoItem != null) && (ToDoItem != "undefined" )) { NumToDoItems++; SetCookie('PT_ToDoItem'+NumToDoItems, ToDoItem, exp); SetCookie('PT_NumToDoList',NumToDoItems, exp); window.location = window.location; } } function set() { VisitorName = prompt("Who are you?"); SetCookie ('VisitorName', VisitorName, exp); SetCookie ('WWHCount', 0, exp); SetCookie ('WWhenH', 0, exp); } function getCookieVal (offset) { var endstr = document.cookie.indexOf (";", offset); if (endstr == -1) endstr = document.cookie.length; return unescape(document.cookie.substring(offset, endstr)); } function GetCookie (name) { var arg = name + "="; var alen = arg.length; var clen = document.cookie.length; var i = 0; while (i < clen) { var j = i + alen; if (document.cookie.substring(i, j) == arg) return getCookieVal (j); i = document.cookie.indexOf(" ", i) + 1; if (i == 0) break; } return null; } function SetCookie (name, value) { var argv = SetCookie.arguments; var argc = SetCookie.arguments.length; var expires = (argc > 2) ? argv[2] : null; var path = (argc > 3) ? argv[3] : null; var domain = (argc > 4) ? argv[4] : null; var secure = (argc > 5) ? argv[5] : false; document.cookie = name + "=" + escape (value) + ((expires == null) ? "" : ("; expires=" + expires.toGMTString())) + ((path == null) ? "" : ("; path=" + path)) + ((domain == null) ? "" : ("; domain=" + domain)) + ((secure == true) ? "; secure" : ""); } function DeleteCookie (name) { var exp = new Date(); exp.setTime (exp.getTime() - 1); var cval = GetCookie (name); document.cookie = name + "=" + cval + "; expires=" + exp.toGMTString(); } </Script> 第二步:把如下代码加入到区域中 列表 <Script> ListToDoItems(); 添加 特别说明:如网页特效代码中有引用图片文件等,请自己下载到本地调试! [] [返回] [打 印] [收 藏] [评 论] 上一篇代码:不错的调色板 下一篇代码:页面源代码解密脚本 极COOL 精品推荐 代码分类 综合特效 状态栏类 游戏相关 页面背景 页面特效 页面导航 文本操作 文本特效 图形特效 鼠标特效 时间日期 密码相关 浏览相关 警告对话 技巧相关 计数转换 测试搜索 代码生成 播放音乐 按钮特效 系统相关 链接特效 黑客性质 相关特效 窗口特效 阅读排行 · 自己动手输入网页背景颜色代码 · 随机数字生成器 · 礼花背景(一个非常经典的网页背景) · 鼠标经过文字变色 · 倒计时代码生成器 · [图文] 代码实现生成弹出窗口的特效 · [图文] 星星满天闪烁的背景 · 颜色英文代码全集 · 速度练习 测试你打字的速度 · 爱情游戏测试 相关代码 · 在页面上写SQL语句操作数据库 · 从ACCESS数据库里调出数据, 显示在页面里.. 总说<.. · 如何用js在页面中传递一个数组? · 如何在页面动态新建table · [求助]使用ado组件访问数据库并在页面显示内容时,.. · 求助如何在页面上显示当前时间 · 图片在页面上显示的问题! · 有iframe内页面刷新时,能同时刷新这个iframe所在.. · 新手:如何在页面中使用js方法? · 怎样将数据库中单选按钮的值影射在页面单选按钮上..