javascript中一维数组的应用
2009-04-11 14:43
239 查看
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>不要碰我</title>
</head>
<body>
<script>
var c=0
var a=new Array();
a[0]="不是说要你不要碰吗";
a[1]="听不懂中文吗";
a[2]="你还碰";
a[3]="你想碰就碰吧!";
document.write ('<a href="javascript:clickme()" style="text-decoration:none">不要碰我,你还碰!!</a>');
function clickme(){
if(c<a.length){
alert(a[c])
c++
}
}
</script>
</body>
</html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>不要碰我</title>
</head>
<body>
<script>
var c=0
var a=new Array();
a[0]="不是说要你不要碰吗";
a[1]="听不懂中文吗";
a[2]="你还碰";
a[3]="你想碰就碰吧!";
document.write ('<a href="javascript:clickme()" style="text-decoration:none">不要碰我,你还碰!!</a>');
function clickme(){
if(c<a.length){
alert(a[c])
c++
}
}
</script>
</body>
</html>
相关文章推荐
- 一维数组及其应用
- 【PHP应用】一维数组构建树形数组,用于商品分类
- 菜鸟QiFang学数据结构系列(一):一维数组的高级应用--一个可容纳超多位数的求N!的程序!
- JavaScript数组的应用
- javascript中的对象和数组的应用技巧
- 一维数组的应用
- 一维数组的应用-数组元素的倒序排列
- javascript 将多维数组转换为一维数组
- List<Map>类型的JavaScript数组应用范例:资讯列表多样化显示
- JavaScript数组应用 可依次读取的公告栏文字
- JavaScript:一维数组动态生成N行N列table表格
- 一维动态数组的应用
- c语言中指针,二维数组,一维数组,指针数组,二级指针,应用
- JavaScript应用(重点数组)
- java 数组的应用(一维)
- List<Map>类型的JavaScript数组应用范例:图片多样化显示
- ACM集训——POJ2352---一维树状数组的应用
- 关于javaScript Array数组方法的应用
- 韩顺平_轻松搞定网页设计(html+css+javascript)_第27讲_js一维数组_一维数组细节_学习笔记_源代码图解_PPT文档整理
- C程序一维数组最全的12中应用[FOR 初学者]