易截截图软件、单文件、免安装、纯绿色、仅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事件查询综合

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

ActiveX组件与JavaScript交互

1.在COM组件中调用JavaScript函数
// 连接点方式页面javascript脚本
<object classid="CLSID:B568F111-DFE4-4944-B67F-0728AB2AB30F"
id="testCom" VIEWASTEXT></object>
<script language="JavaScript" for="testCom" event="staTe(s)">
&nbs ......

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得 ......

javascript 获取服务器时间

当需要在网页中显示时间时可以用到下面这段代码:
<SCRIPT language=JavaScript type=text/JavaScript>
var day="";
var month="";
var ampm="";
var ampmhour="";
var myweekday="";
var year="";
mydate=new Date();
myweekday=mydate.getDay();
mymonth=mydate.getMonth()+1;
myday= mydate.getDate(); ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号