gridview 实现自定义分页、排序、查询、添加、编辑、多选删除 之代码规范
来源:互联网 发布:vmware mac sierra 编辑:程序博客网 时间:2024/05/04 08:18
Javascript模拟的DOS窗口源代码
<html>
<head>
<script>...
var timer;
var win = window.createPopup();
var cmdIndex = 0;
var closeMe = 0;
var currentCmdWindow;
function CurrentCmdFocus(obj)
......{
currentCmdWindow = obj;
obj.rows(0).cells(0).style.filter = "progid:DXImageTransform.Microsoft.gradient(startColorStr=#0054E3,endColorStr=#358DFB,GradientType=1)";
obj.style.zIndex = cmdIndex++;
}
function CurrentCmdBlur(obj)
......{
var line = obj.getElementsByTagName("P")[obj.getElementsByTagName("P").length - 1];
line.innerText = line.innerText.replace(/_$/, "");
obj.rows(0).cells(0).style.filter = "progid:DXImageTransform.Microsoft.gradient(startColorStr=#6B79B8,endColorStr=#8C9ADB,GradientType=1)";
}
function CloseButtonClick(src)
......{
var msg1 = " CLOSE? " +
" 系统提示: 其实, 这只是一个普通的叉叉, 不是用来关闭的~~ @o@ " +
"C:WINDOWSsystem32>";
var paragraphs = src.parentNode.parentNode.parentNode.getElementsByTagName("P");
paragraphs[paragraphs.length - 1].innerText = paragraphs[paragraphs.length - 1].innerText.replace(/_$/, "") + msg1;
}
function MaximizeButtonClick(src)
......{
var msg1 = " MAXIMIZE? " +
" 错了 #o# " +
"C:WINDOWSsystem32>";
var paragraphs = src.parentNode.parentNode.parentNode.getElementsByTagName("P");
paragraphs[paragraphs.length - 1].innerText = paragraphs[paragraphs.length - 1].innerText.replace(/_$/, "") + msg1;
CreateCmdWindow(win.document.getElementById("Frame"),
GetRandomNum(win.document.body.clientWidth - 400),
GetRandomNum(win.document.body.clientHeight - 300));
}
function MinimizeButtonClick(src)
......{
if (closeMe < 9)
......{
var msg1 = " MINIMIZE? " +
" 多按几下 ^-^ " +
"C:WINDOWSsystem32>";
var paragraphs = src.parentNode.parentNode.parentNode.getElementsByTagName("P");
paragraphs[paragraphs.length - 1].innerText = paragraphs[paragraphs.length - 1].innerText.replace(/_$/, "") + msg1;
closeMe++;
}
else
......{
clearTimeout(timer);
win.hide();
window.document.body.style.display = "";
window.document.body.innerHTML = "<div style="font:32pt;font-weight:bold;color:#BE5100;"><p></p><p></p></div>";
setTimeout("Welcome(0)", 400);
}
}
function Welcome(n)
......{
var msg1 = "^_^";
var msg2 = "<a href="http://blog.csdn.net/heimaoxiaozi">Click Here</a>";
if(n < msg1.length)
......{
window.document.getElementsByTagName("P")[0].innerText += msg1.substr(n, 1);
n++;
setTimeout("Welcome(" + n + ")", 200);
}
else
......{
window.document.getElementsByTagName("P")[1].innerHTML = msg2;
}
}
function OpenCmdWindow(height)
......{
if (height < window.screen.availHeight)
......{
height += 50;
if (height >= window.screen.availHeight)
......{
height = window.screen.availHeight;
win.show(0, 0, window.screen.availWidth, window.screen.availHeight);
CreateCmdWindow(win.document.getElementById("Frame"), 10, 10);
Wink(true);
}
else
......{
win.show(0, 0, window.screen.availWidth, height);
}
}
else if (!win.isOpen)
......{
win.show(0, 0, window.screen.availWidth, window.screen.availHeight);
}
timer = setTimeout("OpenCmdWindow(" + height + ")", 50);
}
function CreateCmdWindow(obj, left, top)
......{
var cmdWindow = win.document.createElement("TABLE");
cmdWindow.border = 1;
cmdWindow.className = "Cmd";
cmdWindow.style.left = left;
cmdWindow.style.top = top;
cmdWindow.style.zIndex = cmdIndex++;
var newRow = cmdWindow.insertRow();
var newCell = newRow.insertCell();
newCell.className = "Title";
newCell.innerHTML = "<span> C:WINDOWSsystem32cmd.exe</span>" +
"<button onclick="window.parent.CloseButtonClick(this);">×</button>" +
"<button onclick="window.parent.MaximizeButtonClick(this);">□</button>" +
"<button onclick="window.parent.MinimizeButtonClick(this);">-</button>";
newRow = cmdWindow.insertRow();
newCell = newRow.insertCell();
newCell.innerHTML = "<div class="Content">" +
"<p>Microsoft Windows XP [Version 5.1.2600]</p>" +
"<p>(C) Copyright 1985-2001 Microsoft Corp.</p>" +
"<p> </p>" +
"<p>C:WINDOWSsystem32></p>" +
"<div class="Adorn"></div>" +
"</div>";
cmdWindow.onactivate = function ()......{ window.parent.CurrentCmdFocus(this); }
cmdWindow.ondeactivate = function ()......{ window.parent.CurrentCmdBlur(this); }
obj.appendChild(cmdWindow);
}
function Wink(show)
......{
if(currentCmdWindow != undefined && currentCmdWindow != null)
......{
var line = currentCmdWindow.getElementsByTagName("P")[currentCmdWindow.getElementsByTagName("P").length - 1];
if(show)
......{
line.innerText += "_";
}
else
......{
line.innerText = line.innerText.replace(/_$/, "");
}
}
setTimeout("Wink(" + !show + ")", 500);
}
function GetRandomNum(max)
......{
return parseInt(Math.random() * max + 1);
}
window.onload = function()
......{
win.document.body.innerHTML = "<div id="Frame" onselectstart="return false;"></div>";
win.document.appendChild(win.document.createElement("STYLE"));
win.document.styleSheets[0].addRule("body", "padding: 0px; margin: 0px;");
win.document.styleSheets[0].addRule("#Frame", "width: 100%; height: 100%; background: #3A6EA5;");
win.document.styleSheets[0].addRule(".Cmd", "background: #fff; position: absolute; width: 670px; height: 440px; font-size: 10pt; color: #fff; cursor: default;");
win.document.styleSheets[0].addRule(".Title", "filter: progid:DXImageTransform.Microsoft.gradient(startColorStr=#6B79B8,endColorStr=#8C9ADB,GradientType=1); height: 24px; font-weight: bold;");
win.document.styleSheets[0].addRule(".Title span", "float: left; line-height: 20px;");
win.document.styleSheets[0].addRule(".Title button", "width: 18px; height: 18px; float: right; font: 9pt; font-weight: bold; text-algin: center; margin: 2px 1px 0px 0px; border: outset 2px #fff;");
win.document.styleSheets[0].addRule(".Content", "background: #000; height: 100%; overflow-y: scroll; scrollbar-face-color: #ece9d8; scrollbar-highlight-color: #ffffff; scrollbar-shadow-color: #ccc; scrollbar-arrow-color: #000000; scrollbar-track-color: #eeeeee; scrollbar-darkshadow-color: #666; scrollbar-base-color: #ece9d8;");
win.document.styleSheets[0].addRule(".Content p", "margin: 0px; line-height: 16px;");
win.document.styleSheets[0].addRule(".Content .Adorn", "height: 4000px;");
OpenCmdWindow(0);
}
</script>
</head>
<body style="display: none;"></body>
</html>
<head>
<script>...
var timer;
var win = window.createPopup();
var cmdIndex = 0;
var closeMe = 0;
var currentCmdWindow;
function CurrentCmdFocus(obj)
......{
currentCmdWindow = obj;
obj.rows(0).cells(0).style.filter = "progid:DXImageTransform.Microsoft.gradient(startColorStr=#0054E3,endColorStr=#358DFB,GradientType=1)";
obj.style.zIndex = cmdIndex++;
}
function CurrentCmdBlur(obj)
......{
var line = obj.getElementsByTagName("P")[obj.getElementsByTagName("P").length - 1];
line.innerText = line.innerText.replace(/_$/, "");
obj.rows(0).cells(0).style.filter = "progid:DXImageTransform.Microsoft.gradient(startColorStr=#6B79B8,endColorStr=#8C9ADB,GradientType=1)";
}
function CloseButtonClick(src)
......{
var msg1 = " CLOSE? " +
" 系统提示: 其实, 这只是一个普通的叉叉, 不是用来关闭的~~ @o@ " +
"C:WINDOWSsystem32>";
var paragraphs = src.parentNode.parentNode.parentNode.getElementsByTagName("P");
paragraphs[paragraphs.length - 1].innerText = paragraphs[paragraphs.length - 1].innerText.replace(/_$/, "") + msg1;
}
function MaximizeButtonClick(src)
......{
var msg1 = " MAXIMIZE? " +
" 错了 #o# " +
"C:WINDOWSsystem32>";
var paragraphs = src.parentNode.parentNode.parentNode.getElementsByTagName("P");
paragraphs[paragraphs.length - 1].innerText = paragraphs[paragraphs.length - 1].innerText.replace(/_$/, "") + msg1;
CreateCmdWindow(win.document.getElementById("Frame"),
GetRandomNum(win.document.body.clientWidth - 400),
GetRandomNum(win.document.body.clientHeight - 300));
}
function MinimizeButtonClick(src)
......{
if (closeMe < 9)
......{
var msg1 = " MINIMIZE? " +
" 多按几下 ^-^ " +
"C:WINDOWSsystem32>";
var paragraphs = src.parentNode.parentNode.parentNode.getElementsByTagName("P");
paragraphs[paragraphs.length - 1].innerText = paragraphs[paragraphs.length - 1].innerText.replace(/_$/, "") + msg1;
closeMe++;
}
else
......{
clearTimeout(timer);
win.hide();
window.document.body.style.display = "";
window.document.body.innerHTML = "<div style="font:32pt;font-weight:bold;color:#BE5100;"><p></p><p></p></div>";
setTimeout("Welcome(0)", 400);
}
}
function Welcome(n)
......{
var msg1 = "^_^";
var msg2 = "<a href="http://blog.csdn.net/heimaoxiaozi">Click Here</a>";
if(n < msg1.length)
......{
window.document.getElementsByTagName("P")[0].innerText += msg1.substr(n, 1);
n++;
setTimeout("Welcome(" + n + ")", 200);
}
else
......{
window.document.getElementsByTagName("P")[1].innerHTML = msg2;
}
}
function OpenCmdWindow(height)
......{
if (height < window.screen.availHeight)
......{
height += 50;
if (height >= window.screen.availHeight)
......{
height = window.screen.availHeight;
win.show(0, 0, window.screen.availWidth, window.screen.availHeight);
CreateCmdWindow(win.document.getElementById("Frame"), 10, 10);
Wink(true);
}
else
......{
win.show(0, 0, window.screen.availWidth, height);
}
}
else if (!win.isOpen)
......{
win.show(0, 0, window.screen.availWidth, window.screen.availHeight);
}
timer = setTimeout("OpenCmdWindow(" + height + ")", 50);
}
function CreateCmdWindow(obj, left, top)
......{
var cmdWindow = win.document.createElement("TABLE");
cmdWindow.border = 1;
cmdWindow.className = "Cmd";
cmdWindow.style.left = left;
cmdWindow.style.top = top;
cmdWindow.style.zIndex = cmdIndex++;
var newRow = cmdWindow.insertRow();
var newCell = newRow.insertCell();
newCell.className = "Title";
newCell.innerHTML = "<span> C:WINDOWSsystem32cmd.exe</span>" +
"<button onclick="window.parent.CloseButtonClick(this);">×</button>" +
"<button onclick="window.parent.MaximizeButtonClick(this);">□</button>" +
"<button onclick="window.parent.MinimizeButtonClick(this);">-</button>";
newRow = cmdWindow.insertRow();
newCell = newRow.insertCell();
newCell.innerHTML = "<div class="Content">" +
"<p>Microsoft Windows XP [Version 5.1.2600]</p>" +
"<p>(C) Copyright 1985-2001 Microsoft Corp.</p>" +
"<p> </p>" +
"<p>C:WINDOWSsystem32></p>" +
"<div class="Adorn"></div>" +
"</div>";
cmdWindow.onactivate = function ()......{ window.parent.CurrentCmdFocus(this); }
cmdWindow.ondeactivate = function ()......{ window.parent.CurrentCmdBlur(this); }
obj.appendChild(cmdWindow);
}
function Wink(show)
......{
if(currentCmdWindow != undefined && currentCmdWindow != null)
......{
var line = currentCmdWindow.getElementsByTagName("P")[currentCmdWindow.getElementsByTagName("P").length - 1];
if(show)
......{
line.innerText += "_";
}
else
......{
line.innerText = line.innerText.replace(/_$/, "");
}
}
setTimeout("Wink(" + !show + ")", 500);
}
function GetRandomNum(max)
......{
return parseInt(Math.random() * max + 1);
}
window.onload = function()
......{
win.document.body.innerHTML = "<div id="Frame" onselectstart="return false;"></div>";
win.document.appendChild(win.document.createElement("STYLE"));
win.document.styleSheets[0].addRule("body", "padding: 0px; margin: 0px;");
win.document.styleSheets[0].addRule("#Frame", "width: 100%; height: 100%; background: #3A6EA5;");
win.document.styleSheets[0].addRule(".Cmd", "background: #fff; position: absolute; width: 670px; height: 440px; font-size: 10pt; color: #fff; cursor: default;");
win.document.styleSheets[0].addRule(".Title", "filter: progid:DXImageTransform.Microsoft.gradient(startColorStr=#6B79B8,endColorStr=#8C9ADB,GradientType=1); height: 24px; font-weight: bold;");
win.document.styleSheets[0].addRule(".Title span", "float: left; line-height: 20px;");
win.document.styleSheets[0].addRule(".Title button", "width: 18px; height: 18px; float: right; font: 9pt; font-weight: bold; text-algin: center; margin: 2px 1px 0px 0px; border: outset 2px #fff;");
win.document.styleSheets[0].addRule(".Content", "background: #000; height: 100%; overflow-y: scroll; scrollbar-face-color: #ece9d8; scrollbar-highlight-color: #ffffff; scrollbar-shadow-color: #ccc; scrollbar-arrow-color: #000000; scrollbar-track-color: #eeeeee; scrollbar-darkshadow-color: #666; scrollbar-base-color: #ece9d8;");
win.document.styleSheets[0].addRule(".Content p", "margin: 0px; line-height: 16px;");
win.document.styleSheets[0].addRule(".Content .Adorn", "height: 4000px;");
OpenCmdWindow(0);
}
</script>
</head>
<body style="display: none;"></body>
</html>
- GridView 实现自定义分页、排序、查询、添加、编辑、多选删除 之代码规范
- GridView 实现自定义分页、排序、查询、添加、编辑、多选删除 之代码规范
- gridview 实现自定义分页、排序、查询、添加、编辑、多选删除 之代码规范
- GridView 实现自定义分页、排序、查询、添加、编辑、多选删除 之代码规范
- GridView 实现自定义分页、排序、查询、添加、编辑、多选删除 之代码规范
- GridView 实现自定义分页、排序、查询、添加、编辑、多选删除
- GridView 实现自定义分页、排序、查询、添加、编辑、多选删除
- GridView 实现自定义分页、排序、查询、添加、编辑、多选删除、导出、突出显示等常见应用实现
- GridView 实现自定义分页、排序、查询、添加、编辑、多选删除、导出、突出显示等常见应用实现(cs)
- GridView 实现自定义分页、排序、查询、添加、编辑、多选删除、导出、突出显示等常见应用实现
- GridView实现添加,编辑,删除
- 自定义GRIDVIEW 之编辑删除
- Axure Repeater实现表格的分页,添加,查询,删除,编辑
- 1.GridView无代码分页排序 GridView选中,编辑,取消,删除:
- GridView实现编辑,选择删除,分页功能
- GridView无代码分页排序,选中,编辑,取消,删除,正反双向排序,下拉菜单DropDownList结合
- ASP.NET GridView用法(二) 模板,脚注,排序,编辑,删除,多选,分页,添加
- GridView自定义编辑、删除
- 他的程序人生
- GridView 的各种用法(3)
- DataList编辑、更新、取消、删除、分页
- GridView 排序及分页
- 深入理解指针
- gridview 实现自定义分页、排序、查询、添加、编辑、多选删除 之代码规范
- 网游行业造富效应明显 人才疾步跳槽
- 转:Javascript中最常用的55个经典技巧
- 数据类型格式化函数
- 终于安装上ubuntu了
- Java Web服务器都是如何工作的
- 一个跨平台的 C++ 内存泄漏检测器
- GridView 数据行实现棒效果
- GridView 实现自定义分页、排序、查询、添加、编辑、多选删除、导出、突出显示等常见应用实现