易截截图软件、单文件、免安装、纯绿色、仅160KB

用Javascript以类的方式进行冒泡排序

基本上全部加了注释,一行一注....呵呵
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" " http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>数组排序</title>
<mce:style type="text/css"><!--
body{
font-family:宋体;
font-size:9pt;
background:#EDEDED;
}
h2
{
font-weight:normal;
font-size:18px;
text-align:center;
background:#fff;
border:solid 1px #B8B8B8;
padding:15px 15px 10px 15px;
}
#InputArr
{
width: 218px;
}

#Show
{
margin-top:20px;
width:40%;
min-height:100px;
height:auto;
padding:10px;
background:white;
border:dashed 1px #B8B8B8;
}
--></mce:style><style type="text/css" mce_bogus="1">body{
font-family:宋体;
font-size:9pt;
background:#EDEDED;
}
h2
{
font-weight:normal;
font-size:18px;
text-align:center;
background:#fff;
border:solid 1px #B8B8B8;
padding:15px 15px 10px 15px;
}
#InputArr
{
width: 218px;
}

#Show
{
margin-top:20px;
width:40%;
min-height:100px;
height:auto;
padding:10px;
background:white;
border:dashed 1px #B8B8B8;
}</style>
</head>
<body>
<h2>定义一个包含6个元素的整型数组并赋值,然后使用冒泡排序法进行排序,并将每一轮的排序结果显示出来</h2>
<mce:script type="text/javascript"><!--
//数组排序类
function BubleSort() {

//数组成员
BubleSort.prototype.Nums = new Array();
//排序历史记录
BubleSort.prototype.Hostory = "";
//防止用户重复点击排序造成 历史记录字段重复叠加
BubleSort.prototype.Flag = true;

//定义赋值给[数组成员]的方法.这里是以空格来分割字符串为数组的
BubleSort.prototype.SetArr = function(_str)
{

//定义一个变量获取分割后的数组


相关文档:

javascript实现日期星期的显示

<html>
<body>
<mce:script language=javascript><!--
todayDate = new Date();
date = todayDate.getDate();
month= todayDate.getMonth() +1;
year= todayDate.getYear();
document.write("今天是")
document.write("<br>")
if(navigator.appName == "Netscape")
{
document.w ......

javascript window.onload 错误:尚未实现 解决办法

window.onload= someFunction();//页面报尚未实现错误时不防用下面的试一下   
window.onload = someFunction;    
window.onload = function (){someFunction();};    
window.onload = Function("someFunction();"); ......

JavaScript 时钟(代码)

JavaScript 时钟(代码):
<html>
<body onload=aaa()>
<script type="text/javascript">
var nowtime ;
var year ;
var month ,date,hours,minutes,seconds,all;
function aaa()
{
nowtime = new Date();
year = nowtime.getYear();
month = nowtime.getMonth()+1;
date = nowtim ......

javascript事件查询综合

click() 对象.click() 使对象被点击。
closed 对象.closed 对象窗口是否已关闭true/false
clearTimeout(对象) 清除已设置的setTimeout对象
clearInterval(对象) 清除已设置的setInterval对象
confirm("提示信息") 弹出确认框,确定返回true取消返回false
cursor:样式 更改鼠标样式 hand crosshair text wait help defa ......

ATL与JavaScript交互

原帖地址:http://www.followman.com/bbs/Topic-B11-T262.aspx
JavaScript动态响应ATL事件
相关讨论:http://topic.csdn.net/t/20061012/21/5078729.html

点:脚本传过来的对象是IDispatch接口,应该用IDispatch::Invoke来调用。如果传过来的是个function,那么DISPID
为0,如果是个对象,那么要先用GetIDsOfNames得 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号