This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript"> | |
a();//页面加载执行a() | |
var i; | |
function a() { | |
alert("1"); | |
i = setTimeout("b()", 3000);//3秒后执行b() | |
} | |
function b() { | |
alert("2"); | |
clearTimeout(i); //清除延时代码 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class GuessNums { | |
public static void main(String[] args){ | |
int[] nums = new int[100]; | |
for(int i = 0;i < nums.length;i++){ | |
nums[i] = i; | |
} | |
java.util.Random random = new java.util.Random(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Change{ | |
public static void main(String[] args){ | |
java.util.Scanner input = new java.util.Scanner(System.in); | |
System.out.println("本程序交换数字x和y的值!\n"); | |
System.out.println("请您分别输入数字x和y的值,并以回车结束回车 "); | |
NewerOlder