用链接控制页面小窗口的打开和关闭
来源:互联网 发布:淘宝订单有没有限额 编辑:程序博客网 时间:2024/04/27 22:59
用链接控制页面小窗口的打开和关闭
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"><html><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312"><title>show</title><style type="text/css">#show{display:none;margin:0px auto;background-color:#FF0000;}#txt{width:760px;height:30px;margin:0px auto;background-color:#efefef;}</style></head><body><div id=show></div><div id=txt><a href="#" onClick="show()">Open</a> <a href="#" onClick="show2()">Close</a></div><script type="text/javascript">function show(){if (!document.getElementById) return false;if (!document.getElementById("show")) return false;var show = document.getElementById("show");show.style.width = "0px";show.style.height = "0px";show.style.display = "block";movement = setTimeout("animation()",0)}function animation(){if (!document.getElementById) return false;if (!document.getElementById("show")) return false;var show = document.getElementById("show");var xpos = parseInt(show.style.width);var ypos = parseInt(show.style.height);if (xpos == 760 && ypos == 420){return true;}if (xpos < 760){xpos++;}if (xpos > 760){xpos--;}if (ypos < 420){ypos++;}if (ypos > 420){ypos--;}show.style.width = xpos + "px";show.style.height = ypos + "px";movement = setTimeout("animation()",0);}function show2(){if (!document.getElementById) return false;if (!document.getElementById("show")) return false;var show = document.getElementById("show");show.style.width = "760px";show.style.height = "420px";show.style.display = "block";movement = setTimeout("animation2()",0)}function animation2(){if (!document.getElementById) return false;if (!document.getElementById("show")) return false;var show = document.getElementById("show");var xpos = parseInt(show.style.width);var ypos = parseInt(show.style.height);if (xpos == 0 && ypos == 0){return true;}if (xpos < 0){xpos++;}if (xpos > 0){xpos--;}if (ypos < 0){ypos++;}if (ypos > 0){ypos--;}show.style.width = xpos + "px";show.style.height = ypos + "px";movement = setTimeout("animation2()",0);}</script></body></html>
- 用链接控制页面小窗口的打开和关闭
- 由控制浏览器窗口的打开和关闭
- NGUI 简单控制窗口打开和关闭
- 用showModalDialog打开的窗口关闭时刷新父页面
- 关闭/打开/跳转的窗口页面
- pb中窗口的打开和关闭
- 子窗口的打开和关闭
- jsp 弹出窗口的打开和关闭,以及页面的刷新
- 打开子窗口的时候关闭父页面
- Vuejs关闭打开的窗口后刷新父页面
- js关闭当前弹出的小窗口并打开新窗口
- 打开和关闭窗口以及窗口间的数据传递
- JS弹出框、对话框、提示框,JS关闭窗口、关闭页面和JS控制页面跳转
- 用showModalDialog打开的窗口关闭时怎么刷新父页面
- javascript 页面间的跳转,打开,关闭小技巧
- js 父窗口控制子窗口的行为-打开,关闭,重定位,回复
- js怎么样控制打开网页窗口的大小,HTML如何关闭窗口大全(经典+有用+常用)
- window.open打开的窗口关闭后刷新父页面的子页面
- Symbian学习笔记(17) - 初探WebServices API的使用(上)
- 网页特效代码:打开层/关闭层
- CSS “点”“井号”的含义and ID class区别?
- 页面中弹出小窗口,页面背景直接变半透明
- 今天开博
- 用链接控制页面小窗口的打开和关闭
- 同志们冲啊!
- 摒弃本位意识 改善沟通效果
- 关于servlet中web.xml的一些问题
- Java中文排序
- javascript中闭包的使用
- Windows / SQL Server 2005 的排序规则
- AS400入门笔记及命令行
- 你是“穷忙”一族吗?